nw::snd::SoundHandle::Pause Member Function#include <nw/snd/snd_SoundHandle.h>
void Pause(
bool flag,
int fadeFrames
);
| Name | Description | |
|---|---|---|
| in | flag | Playback pauses when this is true and restarts if this is false. |
| in | fadeFrames | Number of frames that elapse when fading in and out. |
Pauses or restarts a sound.
Pauses or restarts the sound associated with the handle. If the handle is invalid, the function does nothing.
You can pause the sound while fading out or restart it while fading in for the number of frames specified by fadeFrames. If 0 is specified, the sound stops or restarts immediately.
The fade used during pause/restart operates independently for the fade-in used with restart and the fade-out used with pause. The number of frames that elapse when fading correlates to the speed of change from maximum volume to silence and vice versa. A fade operation may therefore complete in less than the specified number of frames if, for example, it is started in the middle of another one.
CONFIDENTIAL