openframeworks / openframeworks/openFrameworks

no get methods for ofSoundPlayer

Open
#1,235 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core feature section-sound
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Right now (007), how do you get a volume of a sample? a float sample.volume?

http://www.openframeworks.cc/documentation/sound/ofSoundPlayer.html#volume

But if you look at ofSoundPlayer or ofBaseSoundPlayer there is no variable volume, or length, or pan, or speed. This brings up a compile error in Xcode saying:

No member named 'volume' in 'ofSoundPlayer'

So here are the variables:

bool bLoop
bool bLoadedOk
bool bPaused
float pan
float volume
float speed
unsigned int length

Here are the set methods:

setVolume(...)
setPan(...)
setSpeed(...)
setPaused(...)
setLoop(...)
setMultiPlay(...)
setPosition(...)

Here are the gets:

getPosition()
getIsPlaying()
getSpeed()
getPan()
setPlayer(...)
getPlayer()
setPositionMS(...)
getPositionMS()

What is missing?

getVolume()
getPaused()
getLoop()

Or has this already been fixed?

Cheers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ofSoundPlayer and ofBaseSoundPlayer declarations, then compare the existing get and set methods with the missing getVolume(), getPaused(), and getLoop() methods listed in the issue. Done means the missing getters are available without the reported compile error and return the corresponding player state.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.