AudioDevice Class Reference

#include <AudioDevice.h>

Collaboration diagram for AudioDevice:

Collaboration graph
[legend]
List of all members.

Detailed Description

Audio device class.

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.
AudioStreamCreateStream (std::string id, const char *filename, uint32 speakers, bool mono=true, bool looped=false)
 Creates a new stream which is assigned to this device.
AudioStreamGetStream (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.


Constructor & Destructor Documentation

AudioDevice::AudioDevice ( std::string  id  ) 

Creates a new audio device.

Definition at line 35 of file AudioDevice.cpp.

AudioDevice::~AudioDevice ( void   ) 

Destroys this audio device.

Definition at line 56 of file AudioDevice.cpp.


Member Function Documentation

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.

Parameters:
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   ) 

Retrieves the text description of this device.

Definition at line 148 of file AudioDevice.cpp.

uint8 AudioDevice::GetDeviceID ( void   ) 

Retrieves the handle of this device.

Definition at line 155 of file AudioDevice.cpp.

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.

Parameters:
id the identifier of the stream which will be retrieved.

Definition at line 102 of file AudioDevice.cpp.

uint16 AudioDevice::GetVolume ( void   ) 

Retrieves the output volume for this device.

Definition at line 141 of file AudioDevice.cpp.

void AudioDevice::Pause ( void   ) 

Pauses the output of this device.

Definition at line 175 of file AudioDevice.cpp.

void AudioDevice::RemoveStream ( std::string  id  ) 

Removes the specified stream from this device.

Parameters:
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.

Parameters:
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   ) 

Stops the output of this device.

Definition at line 188 of file AudioDevice.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Oct 16 17:10:49 2007 for Micole by  doxygen 1.4.7