#include <AudioDevice.h>
Collaboration diagram for AudioDevice:
Definition at line 38 of file AudioDevice.h.
Public Member Functions | |
AudioDevice (std::string id) | |
Creates a new audio device. | |
~AudioDevice (void) | |
Destroys this audio device. | |
AudioStream * | CreateStream (std::string id, const char *filename, uint32 speakers, bool mono=true, bool looped=false) |
Creates a new stream which is assigned to this device. | |
AudioStream * | GetStream (std::string id) |
Retrieves a stream from this device. | |
void | RemoveStream (std::string id) |
Removes the specified stream from this device. | |
void | SetVolume (uint16 volume) |
Sets the output volume for this device. | |
uint16 | GetVolume (void) |
Retrieves the output volume for this device. | |
uint8 | GetDeviceID (void) |
Retrieves the handle of this device. | |
std::string | GetDeviceDescription (void) |
Retrieves the text description of this device. | |
void | Start (void) |
Starts or resumes the output of this device. | |
void | Pause (void) |
Pauses the output of this device. | |
void | Stop (void) |
Stops the output of this device. | |
uint8 | GetSpeakersNum (void) |
Retrieves the number of speakers the device supports. |
AudioDevice::AudioDevice | ( | std::string | id | ) |
AudioDevice::~AudioDevice | ( | void | ) |
AudioStream * AudioDevice::CreateStream | ( | std::string | id, | |
const char * | filename, | |||
uint32 | speakers, | |||
bool | mono = true , |
|||
bool | looped = false | |||
) |
Creates a new stream which is assigned to this device.
id | the identifier of the newly created stream. | |
filename | location the filename. | |
speakers | speakers (see SPEAKER(N) macro). | |
mono | play the steam in mono. | |
looped | loop the file. |
Definition at line 76 of file AudioDevice.cpp.
std::string AudioDevice::GetDeviceDescription | ( | void | ) |
uint8 AudioDevice::GetDeviceID | ( | void | ) |
uint8 AudioDevice::GetSpeakersNum | ( | void | ) |
Retrieves the number of speakers the device supports.
Definition at line 201 of file AudioDevice.cpp.
AudioStream * AudioDevice::GetStream | ( | std::string | id | ) |
Retrieves a stream from this device.
id | the identifier of the stream which will be retrieved. |
Definition at line 102 of file AudioDevice.cpp.
uint16 AudioDevice::GetVolume | ( | void | ) |
void AudioDevice::Pause | ( | void | ) |
void AudioDevice::RemoveStream | ( | std::string | id | ) |
Removes the specified stream from this device.
id | the identifier of the stream which will be removed. |
Definition at line 114 of file AudioDevice.cpp.
void AudioDevice::SetVolume | ( | uint16 | volume | ) |
Sets the output volume for this device.
volume | the volume level (0 - 10000). |
Definition at line 127 of file AudioDevice.cpp.
void AudioDevice::Start | ( | void | ) |
Starts or resumes the output of this device.
The output is automatically started by constructor, so there is no need for using this function unless the output is paused or stopped.
Definition at line 162 of file AudioDevice.cpp.
void AudioDevice::Stop | ( | void | ) |