reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofSoundPlayer.cpp File Reference
#include "ofSoundPlayer.h"
#include "ofLog.h"
#include "glm/common.hpp"

Macros

#define GLM_FORCE_CTOR_INIT
 

Functions

void ofSoundStopAll ()
 Stops all active sound players on FMOD-based systems (windows, osx).
 
void ofSoundSetVolume (float vol)
 Sets global volume for FMOD-based sound players (windows, osx).
 
void ofSoundUpdate ()
 Call in your app's update() to update FMOD-based sound players.
 
void ofSoundShutdown ()
 Cleans up FMOD (windows, osx).
 
float * ofSoundGetSpectrum (int nBands)
 Gets a frequency spectrum sample, taking all current sound players into account.
 

Macro Definition Documentation

◆ GLM_FORCE_CTOR_INIT

#define GLM_FORCE_CTOR_INIT

Function Documentation

◆ 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
nBandsnumber of spectrum bands to return, max 512.
Returns
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
volrange is 0 to 1.

◆ 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.