#include <nw/snd/snd_SoundPlayer.h>
template< class Function >
Function ForEachSound(
Function function,
bool reverse = false
);
| Name | Description | |
|---|---|---|
| in | function | Function pointer or function object |
| in | reverse | Specify TRUE to reverse the processing order. |
Performs the processing for all sound currently playing on the player.
Calls
function( nw4r::snd::SoundHandle& handle )
for all playing sounds in the player. The sound handle associated with the played back sound, given by handle, is passed to function. This is a temporary handle, so this handle cannot be used again later.
function is called to play back sounds from the oldest to the newest. If TRUE is specified for reverse, the function is called to play back sonds from the newest to the oldest.
A function pointer or a function object is passed to function. An example of passing a function pointer is shown below:
void ReportSoundId( nw::snd::SoundHandle& handle ) { NN_LOG( "%d\n", handle.GetId() ); }
soundPlayer.ForEachSound( ReportSoundId );
CONFIDENTIAL