ofDocsdocumentation sound ofSoundPlayer (functions)

ofSoundPlayer (functions)


ofSoundGetSpectrum( ... )

float * ofSoundGetSpectrum(int nBands)

Gets a frequency spectrum sample, taking all current sound players into account.

Each band will be represented as a float between 0 and 1.

Warning: This isn't implemented on mobile & embedded platforms.

Parameters:

nBands number of spectrum bands to return, max 512. \return pointer to an FFT sample, sample size is equal to the nBands parameter.


ofSoundSetVolume( ... )

void ofSoundSetVolume(float vol)

Sets global volume for FMOD-based sound players (windows, osx).

Parameters:

vol range is 0 to 1.

Sets the volume of all ofSoundPlayer objects to the volume (vol) specified. 0.0 - 1.0 range. 0.0 is silent and 1.0 is full volume.


ofSoundShutdown( )

void ofSoundShutdown()

Cleans up FMOD (windows, osx).


ofSoundStopAll( )

void ofSoundStopAll()

Stops all active sound players on FMOD-based systems (windows, osx).


ofSoundUpdate( )

void ofSoundUpdate()

Call in your app's update() to update FMOD-based sound players.

Updates sound engine. This should be called every frame.