Blender V2.61 - r43446
Public Member Functions

AUD_IDevice Class Reference

#include <AUD_IDevice.h>

Inheritance diagram for AUD_IDevice:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~AUD_IDevice ()
virtual AUD_DeviceSpecs getSpecs () const =0
virtual AUD_Reference
< AUD_IHandle
play (AUD_Reference< AUD_IReader > reader, bool keep=false)=0
virtual AUD_Reference
< AUD_IHandle
play (AUD_Reference< AUD_IFactory > factory, bool keep=false)=0
virtual void stopAll ()=0
virtual void lock ()=0
virtual void unlock ()=0
virtual float getVolume () const =0
virtual void setVolume (float volume)=0

Detailed Description

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.

Warning:
Thread safety must be insured so that no reader is beeing called twice at the same time.

Definition at line 47 of file AUD_IDevice.h.


Constructor & Destructor Documentation

virtual AUD_IDevice::~AUD_IDevice ( ) [inline, virtual]

Destroys the device.

Definition at line 53 of file AUD_IDevice.h.


Member Function Documentation

virtual AUD_DeviceSpecs AUD_IDevice::getSpecs ( ) const [pure virtual]

Returns the specification of the device.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

virtual float AUD_IDevice::getVolume ( ) const [pure virtual]

Retrieves the overall device volume.

Returns:
The overall device volume.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

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.

Warning:
Make sure the locking time is as small as possible to avoid playback delays that result in unexpected noise and cracks.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

virtual AUD_Reference<AUD_IHandle> AUD_IDevice::play ( AUD_Reference< AUD_IReader reader,
bool  keep = false 
) [pure virtual]

Plays a sound source.

Parameters:
readerThe reader to play.
keepWhen keep is true the sound source will not be deleted but set to paused when its end has been reached.
Returns:
Returns a handle with which the playback can be controlled. This is NULL if the sound couldn't be played back.
Exceptions:
AUD_ExceptionThrown if there's an unexpected (from the device side) error during creation of the reader.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

virtual AUD_Reference<AUD_IHandle> AUD_IDevice::play ( AUD_Reference< AUD_IFactory factory,
bool  keep = false 
) [pure virtual]

Plays a sound source.

Parameters:
factoryThe factory to create the reader for the sound source.
keepWhen keep is true the sound source will not be deleted but set to paused when its end has been reached.
Returns:
Returns a handle with which the playback can be controlled. This is NULL if the sound couldn't be played back.
Exceptions:
AUD_ExceptionThrown if there's an unexpected (from the device side) error during creation of the reader.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

virtual void AUD_IDevice::setVolume ( float  volume) [pure virtual]

Sets the overall device volume.

Parameters:
handleThe sound handle.
volumeThe overall device volume.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

virtual void AUD_IDevice::stopAll ( ) [pure virtual]

Stops all playing sounds.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.

virtual void AUD_IDevice::unlock ( ) [pure virtual]

Unlocks the previously locked device.

Implemented in AUD_NULLDevice, AUD_SoftwareDevice, and AUD_OpenALDevice.


The documentation for this class was generated from the following file: