Audaspace 1.5.0
A high level audio library.
|
The IDevice interface represents an output device for sound sources. More...
#include <IDevice.h>
Public Member Functions | |
virtual | ~IDevice () |
Destroys the device. | |
virtual DeviceSpecs | getSpecs () const =0 |
Returns the specification of the device. | |
virtual std::shared_ptr< IHandle > | play (std::shared_ptr< IReader > reader, bool keep=false)=0 |
Plays a sound source. | |
virtual std::shared_ptr< IHandle > | play (std::shared_ptr< ISound > sound, bool keep=false)=0 |
Plays a sound source. | |
virtual void | stopAll ()=0 |
Stops all playing sounds. | |
virtual void | lock ()=0 |
Locks the device. | |
virtual void | unlock ()=0 |
Unlocks the previously locked device. | |
virtual float | getVolume () const =0 |
Retrieves the overall device volume. | |
virtual void | setVolume (float volume)=0 |
Sets the overall device volume. | |
virtual ISynchronizer * | getSynchronizer ()=0 |
Retrieves the synchronizer for this device, which enables accurate synchronization between audio playback and video playback for example. | |
The IDevice interface represents an output device for sound sources.
Output devices may be several backends such as platform independand like SDL or OpenAL or platform specific like ALSA, but they may also be files, RAM buffers or other types of streams.
|
pure virtual |
Returns the specification of the device.
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
pure virtual |
Retrieves the synchronizer for this device, which enables accurate synchronization between audio playback and video playback for example.
Implemented in NULLDevice, SoftwareDevice, CoreAudioDevice, JackDevice, OpenALDevice, and PulseAudioDevice.
|
pure virtual |
Retrieves the overall device volume.
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
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.
Implements ILockable.
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
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. |
Exception | Thrown if there's an unexpected (from the device side) error during creation of the reader. |
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
pure virtual |
Plays a sound source.
sound | The sound 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. |
Exception | Thrown if there's an unexpected (from the device side) error during creation of the reader. |
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
pure virtual |
Sets the overall device volume.
volume | The overall device volume. |
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
pure virtual |
Stops all playing sounds.
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.
|
pure virtual |
Unlocks the previously locked device.
Implements ILockable.
Implemented in NULLDevice, SoftwareDevice, and OpenALDevice.