|
Blender
V2.59
|
#include <AUD_IDevice.h>

Public Member Functions | |
| virtual | ~AUD_IDevice () |
| virtual AUD_DeviceSpecs | getSpecs () const =0 |
| virtual AUD_Handle * | play (AUD_IReader *reader, bool keep=false)=0 |
| virtual AUD_Handle * | play (AUD_IFactory *factory, bool keep=false)=0 |
| virtual bool | pause (AUD_Handle *handle)=0 |
| virtual bool | resume (AUD_Handle *handle)=0 |
| virtual bool | stop (AUD_Handle *handle)=0 |
| virtual bool | getKeep (AUD_Handle *handle)=0 |
| virtual bool | setKeep (AUD_Handle *handle, bool keep)=0 |
| virtual bool | seek (AUD_Handle *handle, float position)=0 |
| virtual float | getPosition (AUD_Handle *handle)=0 |
| virtual AUD_Status | getStatus (AUD_Handle *handle)=0 |
| virtual void | lock ()=0 |
| virtual void | unlock ()=0 |
| virtual float | getVolume () const =0 |
| virtual void | setVolume (float volume)=0 |
| virtual float | getVolume (AUD_Handle *handle)=0 |
| virtual bool | setVolume (AUD_Handle *handle, float volume)=0 |
| virtual float | getPitch (AUD_Handle *handle)=0 |
| virtual bool | setPitch (AUD_Handle *handle, float pitch)=0 |
| virtual int | getLoopCount (AUD_Handle *handle)=0 |
| virtual bool | setLoopCount (AUD_Handle *handle, int count)=0 |
| virtual bool | setStopCallback (AUD_Handle *handle, stopCallback callback=0, void *data=0)=0 |
This class represents an output device for sound sources. Output devices may be several backends such as plattform independand like SDL or OpenAL or plattform specific like DirectSound, but they may also be files, RAM buffers or other types of streams.
Definition at line 54 of file AUD_IDevice.h.
| virtual AUD_IDevice::~AUD_IDevice | ( | ) | [inline, virtual] |
Destroys the device.
Definition at line 60 of file AUD_IDevice.h.
| virtual bool AUD_IDevice::getKeep | ( | AUD_Handle * | handle | ) | [pure virtual] |
Gets the behaviour of the device for a played back sound when the sound doesn't return any more samples.
| handle | The handle returned by the play function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by Handle_get_keep().
| virtual int AUD_IDevice::getLoopCount | ( | AUD_Handle * | handle | ) | [pure virtual] |
Retrieves the loop count of a playing sound. A negative value indicates infinity.
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by Handle_get_loop_count().
| virtual float AUD_IDevice::getPitch | ( | AUD_Handle * | handle | ) | [pure virtual] |
Retrieves the pitch of a playing sound.
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by Handle_get_pitch().
| virtual float AUD_IDevice::getPosition | ( | AUD_Handle * | handle | ) | [pure virtual] |
Retrieves the current playback position of a sound.
| handle | The handle returned by the play function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_getPosition(), AUD_getSequencerPosition(), and Handle_get_position().
| virtual AUD_DeviceSpecs AUD_IDevice::getSpecs | ( | ) | const [pure virtual] |
Returns the specification of the device.
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
| virtual AUD_Status AUD_IDevice::getStatus | ( | AUD_Handle * | handle | ) | [pure virtual] |
Returns the status of a played back sound.
| handle | The handle returned by the play function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_getStatus(), and Handle_get_status().
| virtual float AUD_IDevice::getVolume | ( | ) | const [pure virtual] |
Retrieves the overall device volume.
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by Handle_get_volume().
| virtual float AUD_IDevice::getVolume | ( | AUD_Handle * | handle | ) | [pure virtual] |
Retrieves the volume of a playing sound.
| handle | The sound handle. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
| virtual void AUD_IDevice::lock | ( | ) | [pure virtual] |
Locks the device. Used to make sure that between lock and unlock, no buffers are read, so that it is possible to start, resume, pause, stop or seek several playback handles simultaneously.
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_lock().
| virtual bool AUD_IDevice::pause | ( | AUD_Handle * | handle | ) | [pure virtual] |
Pauses a played back sound.
| handle | The handle returned by the play function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_pause(), Handle_pause(), and pauseSound().
| virtual AUD_Handle* AUD_IDevice::play | ( | AUD_IReader * | reader, |
| bool | keep = false |
||
| ) | [pure virtual] |
Plays a sound source.
| reader | The reader to play. |
| keep | When keep is true the sound source will not be deleted but set to paused when its end has been reached. |
| AUD_Exception | Thrown if there's an unexpected (from the device side) error during creation of the reader. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_pauseAfter(), and AUD_play().
| virtual AUD_Handle* AUD_IDevice::play | ( | AUD_IFactory * | factory, |
| bool | keep = false |
||
| ) | [pure virtual] |
Plays a sound source.
| factory | The factory to create the reader for the sound source. |
| keep | When keep is true the sound source will not be deleted but set to paused when its end has been reached. |
| AUD_Exception | Thrown if there's an unexpected (from the device side) error during creation of the reader. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
| virtual bool AUD_IDevice::resume | ( | AUD_Handle * | handle | ) | [pure virtual] |
Resumes a paused sound.
| handle | The handle returned by the play function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_resume(), and Handle_resume().
| virtual bool AUD_IDevice::seek | ( | AUD_Handle * | handle, |
| float | position | ||
| ) | [pure virtual] |
Seeks in a played back sound.
| handle | The handle returned by the play function. |
| position | The new position from where to play back, in seconds. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_seek(), AUD_seekSequencer(), and Handle_set_position().
| virtual bool AUD_IDevice::setKeep | ( | AUD_Handle * | handle, |
| bool | keep | ||
| ) | [pure virtual] |
Sets the behaviour of the device for a played back sound when the sound doesn't return any more samples.
| handle | The handle returned by the play function. |
| keep | True when the source should be paused and not deleted. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_setKeep(), and Handle_set_keep().
| virtual bool AUD_IDevice::setLoopCount | ( | AUD_Handle * | handle, |
| int | count | ||
| ) | [pure virtual] |
Sets the loop count of a playing sound. A negative value indicates infinity.
| handle | The sound handle. |
| count | The new loop count. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_setLoop(), and Handle_set_loop_count().
| virtual bool AUD_IDevice::setPitch | ( | AUD_Handle * | handle, |
| float | pitch | ||
| ) | [pure virtual] |
Sets the pitch of a playing sound.
| handle | The sound handle. |
| pitch | The pitch. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_setSoundPitch(), and Handle_set_pitch().
| virtual bool AUD_IDevice::setStopCallback | ( | AUD_Handle * | handle, |
| stopCallback | callback = 0, |
||
| void * | data = 0 |
||
| ) | [pure virtual] |
Sets the callback function that's called when the end of a playing sound is reached.
| handle | The sound handle. |
| callback | The callback function. |
| data | The data that should be passed to the callback function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_pauseAfter().
| virtual void AUD_IDevice::setVolume | ( | float | volume | ) | [pure virtual] |
Sets the overall device volume.
| handle | The sound handle. |
| volume | The overall device volume. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_setSoundVolume(), and Handle_set_volume().
| virtual bool AUD_IDevice::setVolume | ( | AUD_Handle * | handle, |
| float | volume | ||
| ) | [pure virtual] |
Sets the volume of a playing sound.
| handle | The sound handle. |
| volume | The volume. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
| virtual bool AUD_IDevice::stop | ( | AUD_Handle * | handle | ) | [pure virtual] |
Stops a played back or paused sound. The handle is definitely invalid afterwards.
| handle | The handle returned by the play function. |
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_stop(), and Handle_stop().
| virtual void AUD_IDevice::unlock | ( | ) | [pure virtual] |
Unlocks the previously locked device.
Implemented in AUD_OpenALDevice, AUD_SoftwareDevice, and AUD_NULLDevice.
Referenced by AUD_unlock().