#include <SoundControl.h>
Public Member Functions | |
| SoundControl (IDirectSoundBuffer8 *ds_buffer_interface_ex) | |
| virtual | ~SoundControl (void) |
| IDirectSoundBuffer8 * | GetInterfaceEx () const |
| virtual bool | IsPlaying () const |
| virtual unsigned | GetCurrentPosition () const |
| virtual bool | SetCurrentPosition (unsigned position) |
| virtual float | GetVolume () const |
| virtual bool | SetVolume (float volume) |
| virtual bool | Play (PlayFlags play_flags=Restart) |
| virtual bool | Pause () |
| virtual bool | Stop () |
Protected Attributes | |
| IDirectSoundBuffer8 * | _ds_buffer_interface_ex |
The sound control class to play, pause and stop the sound buffer as well as to set and get specific sound settings.
| xl7::directsound::SoundControl::SoundControl | ( | IDirectSoundBuffer8 * | ds_buffer_interface_ex | ) | [explicit] |
Explicit constructor.
| xl7::directsound::SoundControl::~SoundControl | ( | void | ) | [virtual] |
Destruction.
| unsigned xl7::directsound::SoundControl::GetCurrentPosition | ( | ) | const [virtual] |
Returns the current position, in bytes, within the sound buffer.
Implements xl7::directsound::ISoundControl.
| IDirectSoundBuffer8* xl7::directsound::SoundControl::GetInterfaceEx | ( | ) | const [inline] |
Returns the "extended" DirectSound buffer interface.
| float xl7::directsound::SoundControl::GetVolume | ( | ) | const [virtual] |
Returns the volume, from 0 (silence) to 1 ("full throttle").
Implements xl7::directsound::ISoundControl.
| bool xl7::directsound::SoundControl::IsPlaying | ( | ) | const [virtual] |
Returns true, if the sound is currently playing.
Implements xl7::directsound::ISoundControl.
| bool xl7::directsound::SoundControl::Pause | ( | ) | [virtual] |
Causes the sound buffer to stop playing (retaining the current position).
Implements xl7::directsound::ISoundControl.
| bool xl7::directsound::SoundControl::Play | ( | PlayFlags | play_flags = Restart |
) | [virtual] |
Causes the sound buffer to play.
Implements xl7::directsound::ISoundControl.
| bool xl7::directsound::SoundControl::SetCurrentPosition | ( | unsigned | position | ) | [virtual] |
Seeks to the given position, in bytes, within the sound buffer.
Implements xl7::directsound::ISoundControl.
| bool xl7::directsound::SoundControl::SetVolume | ( | float | volume | ) | [virtual] |
Sets the volume, from 0 (silence) to 1 ("full throttle").
Implements xl7::directsound::ISoundControl.
| bool xl7::directsound::SoundControl::Stop | ( | ) | [virtual] |
Causes the sound buffer to stop playing (resetting the current position).
Implements xl7::directsound::ISoundControl.
IDirectSoundBuffer8* xl7::directsound::SoundControl::_ds_buffer_interface_ex [protected] |
The "extended" DirectSound buffer interface.
1.7.1