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

Public Member Functions | |
| AUD_OpenALDevice (AUD_DeviceSpecs specs, int buffersize=AUD_DEFAULT_BUFFER_SIZE) | |
| void | updateStreams () |
| virtual | ~AUD_OpenALDevice () |
| virtual AUD_DeviceSpecs | getSpecs () const |
| virtual AUD_Handle * | play (AUD_IReader *reader, bool keep=false) |
| virtual AUD_Handle * | play (AUD_IFactory *factory, bool keep=false) |
| virtual bool | pause (AUD_Handle *handle) |
| virtual bool | resume (AUD_Handle *handle) |
| virtual bool | stop (AUD_Handle *handle) |
| virtual bool | getKeep (AUD_Handle *handle) |
| virtual bool | setKeep (AUD_Handle *handle, bool keep) |
| virtual bool | seek (AUD_Handle *handle, float position) |
| virtual float | getPosition (AUD_Handle *handle) |
| virtual AUD_Status | getStatus (AUD_Handle *handle) |
| virtual void | lock () |
| virtual void | unlock () |
| virtual float | getVolume () const |
| virtual void | setVolume (float volume) |
| virtual float | getVolume (AUD_Handle *handle) |
| virtual bool | setVolume (AUD_Handle *handle, float volume) |
| virtual float | getPitch (AUD_Handle *handle) |
| virtual bool | setPitch (AUD_Handle *handle, float pitch) |
| virtual int | getLoopCount (AUD_Handle *handle) |
| virtual bool | setLoopCount (AUD_Handle *handle, int count) |
| virtual bool | setStopCallback (AUD_Handle *handle, stopCallback callback=NULL, void *data=NULL) |
| virtual AUD_Vector3 | getListenerLocation () const |
| virtual void | setListenerLocation (const AUD_Vector3 &location) |
| virtual AUD_Vector3 | getListenerVelocity () const |
| virtual void | setListenerVelocity (const AUD_Vector3 &velocity) |
| virtual AUD_Quaternion | getListenerOrientation () const |
| virtual void | setListenerOrientation (const AUD_Quaternion &orientation) |
| virtual float | getSpeedOfSound () const |
| virtual void | setSpeedOfSound (float speed) |
| virtual float | getDopplerFactor () const |
| virtual void | setDopplerFactor (float factor) |
| virtual AUD_DistanceModel | getDistanceModel () const |
| virtual void | setDistanceModel (AUD_DistanceModel model) |
| virtual AUD_Vector3 | getSourceLocation (AUD_Handle *handle) |
| virtual bool | setSourceLocation (AUD_Handle *handle, const AUD_Vector3 &location) |
| virtual AUD_Vector3 | getSourceVelocity (AUD_Handle *handle) |
| virtual bool | setSourceVelocity (AUD_Handle *handle, const AUD_Vector3 &velocity) |
| virtual AUD_Quaternion | getSourceOrientation (AUD_Handle *handle) |
| virtual bool | setSourceOrientation (AUD_Handle *handle, const AUD_Quaternion &orientation) |
| virtual bool | isRelative (AUD_Handle *handle) |
| virtual bool | setRelative (AUD_Handle *handle, bool relative) |
| virtual float | getVolumeMaximum (AUD_Handle *handle) |
| virtual bool | setVolumeMaximum (AUD_Handle *handle, float volume) |
| virtual float | getVolumeMinimum (AUD_Handle *handle) |
| virtual bool | setVolumeMinimum (AUD_Handle *handle, float volume) |
| virtual float | getDistanceMaximum (AUD_Handle *handle) |
| virtual bool | setDistanceMaximum (AUD_Handle *handle, float distance) |
| virtual float | getDistanceReference (AUD_Handle *handle) |
| virtual bool | setDistanceReference (AUD_Handle *handle, float distance) |
| virtual float | getAttenuation (AUD_Handle *handle) |
| virtual bool | setAttenuation (AUD_Handle *handle, float factor) |
| virtual float | getConeAngleOuter (AUD_Handle *handle) |
| virtual bool | setConeAngleOuter (AUD_Handle *handle, float angle) |
| virtual float | getConeAngleInner (AUD_Handle *handle) |
| virtual bool | setConeAngleInner (AUD_Handle *handle, float angle) |
| virtual float | getConeVolumeOuter (AUD_Handle *handle) |
| virtual bool | setConeVolumeOuter (AUD_Handle *handle, float volume) |
This device plays through OpenAL.
Definition at line 48 of file AUD_OpenALDevice.h.
| AUD_OpenALDevice::AUD_OpenALDevice | ( | AUD_DeviceSpecs | specs, |
| int | buffersize = AUD_DEFAULT_BUFFER_SIZE |
||
| ) |
Opens the OpenAL audio device for playback.
| specs | The wanted audio specification. |
| buffersize | The size of the internal buffer. |
| AUD_Exception | Thrown if the audio device cannot be opened. |
Definition at line 311 of file AUD_OpenALDevice.cpp.
References AUD_CHANNELS_STEREO, AUD_ERROR_OPENAL, AUD_FORMAT_FLOAT32, AUD_FORMAT_S16, AUD_RATE_INVALID, AUD_THROW, AUD_DeviceSpecs::channels, AUD_DeviceSpecs::format, NULL, and AUD_DeviceSpecs::rate.
| AUD_OpenALDevice::~AUD_OpenALDevice | ( | ) | [virtual] |
Definition at line 376 of file AUD_OpenALDevice.cpp.
References AUD_OPENAL_CYCLE_BUFFERS, AUD_OpenALHandle::buffers, AUD_OpenALHandle::isBuffered, lock(), NULL, AUD_OpenALHandle::reader, AUD_OpenALHandle::source, and unlock().
| float AUD_OpenALDevice::getAttenuation | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the attenuation of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1534 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getConeAngleInner | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the inner angle of the cone of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1588 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getConeAngleOuter | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the outer angle of the cone of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1561 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getConeVolumeOuter | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the outer volume of the cone of a source. The volume between inner and outer angle is interpolated between inner volume and this value.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1615 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getDistanceMaximum | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the maximum distance of a source. If a source is further away from the reader than this distance, the volume will automatically be set to 0.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1480 of file AUD_OpenALDevice.cpp.
| AUD_DistanceModel AUD_OpenALDevice::getDistanceModel | ( | ) | const [virtual] |
Retrieves the distance model.
Implements AUD_I3DDevice.
Definition at line 1264 of file AUD_OpenALDevice.cpp.
References AUD_DISTANCE_MODEL_EXPONENT, AUD_DISTANCE_MODEL_EXPONENT_CLAMPED, AUD_DISTANCE_MODEL_INVALID, AUD_DISTANCE_MODEL_INVERSE, AUD_DISTANCE_MODEL_INVERSE_CLAMPED, AUD_DISTANCE_MODEL_LINEAR, and AUD_DISTANCE_MODEL_LINEAR_CLAMPED.
| float AUD_OpenALDevice::getDistanceReference | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the reference distance of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1507 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getDopplerFactor | ( | ) | const [virtual] |
Retrieves the doppler factor. This value is a scaling factor for the velocity vectors of sources and listener which is used while calculating the doppler effect.
Implements AUD_I3DDevice.
Definition at line 1254 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::getKeep | ( | AUD_Handle * | handle | ) | [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. |
Implements AUD_IDevice.
Definition at line 824 of file AUD_OpenALDevice.cpp.
| AUD_Vector3 AUD_OpenALDevice::getListenerLocation | ( | ) | const [virtual] |
Retrieves the listener location.
Implements AUD_I3DDevice.
Definition at line 1196 of file AUD_OpenALDevice.cpp.
References p.
| AUD_Quaternion AUD_OpenALDevice::getListenerOrientation | ( | ) | const [virtual] |
Retrieves the listener orientation.
Implements AUD_I3DDevice.
Definition at line 1220 of file AUD_OpenALDevice.cpp.
| AUD_Vector3 AUD_OpenALDevice::getListenerVelocity | ( | ) | const [virtual] |
Retrieves the listener velocity.
Implements AUD_I3DDevice.
Definition at line 1208 of file AUD_OpenALDevice.cpp.
| int AUD_OpenALDevice::getLoopCount | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the loop count of a playing sound. A negative value indicates infinity.
Implements AUD_IDevice.
Definition at line 1038 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getPitch | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the pitch of a playing sound.
Implements AUD_IDevice.
Definition at line 1018 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getPosition | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the current playback position of a sound.
| handle | The handle returned by the play function. |
Implements AUD_IDevice.
Definition at line 920 of file AUD_OpenALDevice.cpp.
References AUD_OPENAL_CYCLE_BUFFERS, AUD_IReader::getPosition(), AUD_IReader::getSpecs(), AUD_OpenALHandle::isBuffered, lock(), AUD_Specs::rate, AUD_OpenALHandle::reader, AUD_OpenALHandle::source, and unlock().
| AUD_Vector3 AUD_OpenALDevice::getSourceLocation | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the location of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1312 of file AUD_OpenALDevice.cpp.
| AUD_Quaternion AUD_OpenALDevice::getSourceOrientation | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the orientation of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1370 of file AUD_OpenALDevice.cpp.
| AUD_Vector3 AUD_OpenALDevice::getSourceVelocity | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the velocity of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1341 of file AUD_OpenALDevice.cpp.
| AUD_DeviceSpecs AUD_OpenALDevice::getSpecs | ( | ) | const [virtual] |
Returns the specification of the device.
Implements AUD_IDevice.
Definition at line 437 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getSpeedOfSound | ( | ) | const [virtual] |
Retrieves the speed of sound. This value is needed for doppler effect calculation.
Implements AUD_I3DDevice.
Definition at line 1244 of file AUD_OpenALDevice.cpp.
| AUD_Status AUD_OpenALDevice::getStatus | ( | AUD_Handle * | handle | ) | [virtual] |
Returns the status of a played back sound.
| handle | The handle returned by the play function. |
Implements AUD_IDevice.
Definition at line 943 of file AUD_OpenALDevice.cpp.
References AUD_STATUS_INVALID, AUD_STATUS_PAUSED, AUD_STATUS_PLAYING, i, lock(), and unlock().
| float AUD_OpenALDevice::getVolume | ( | ) | const [virtual] |
Retrieves the overall device volume.
Implements AUD_IDevice.
Definition at line 986 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getVolume | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the volume of a playing sound.
| handle | The sound handle. |
Implements AUD_IDevice.
Definition at line 998 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getVolumeMaximum | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the maximum volume of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1425 of file AUD_OpenALDevice.cpp.
| float AUD_OpenALDevice::getVolumeMinimum | ( | AUD_Handle * | handle | ) | [virtual] |
Retrieves the minimum volume of a source.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1453 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::isRelative | ( | AUD_Handle * | handle | ) | [virtual] |
Checks whether the source location, velocity and orientation are relative to the listener.
| handle | The handle of the source. |
Implements AUD_I3DDevice.
Definition at line 1398 of file AUD_OpenALDevice.cpp.
| void AUD_OpenALDevice::lock | ( | ) | [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 AUD_IDevice.
Definition at line 976 of file AUD_OpenALDevice.cpp.
Referenced by getAttenuation(), getConeAngleInner(), getConeAngleOuter(), getConeVolumeOuter(), getDistanceMaximum(), getDistanceReference(), getKeep(), getLoopCount(), getPitch(), getPosition(), getSourceLocation(), getSourceVelocity(), getStatus(), getVolume(), getVolumeMaximum(), getVolumeMinimum(), isRelative(), pause(), play(), resume(), seek(), setAttenuation(), setConeAngleInner(), setConeAngleOuter(), setConeVolumeOuter(), setDistanceMaximum(), setDistanceReference(), setKeep(), setLoopCount(), setPitch(), setRelative(), setSourceLocation(), setSourceOrientation(), setSourceVelocity(), setStopCallback(), setVolume(), setVolumeMaximum(), setVolumeMinimum(), stop(), updateStreams(), and ~AUD_OpenALDevice().
| bool AUD_OpenALDevice::pause | ( | AUD_Handle * | handle | ) | [virtual] |
Pauses a played back sound.
| handle | The handle returned by the play function. |
Implements AUD_IDevice.
Definition at line 721 of file AUD_OpenALDevice.cpp.
References i, lock(), and unlock().
Referenced by updateStreams().
| AUD_Handle * AUD_OpenALDevice::play | ( | AUD_IReader * | reader, |
| bool | keep = false |
||
| ) | [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. |
Implements AUD_IDevice.
Definition at line 542 of file AUD_OpenALDevice.cpp.
References AUD_CHANNELS_INVALID, AUD_DEVICE_SAMPLE_SIZE, AUD_ERROR_OPENAL, AUD_FORMAT_FLOAT32, AUD_OPENAL_CYCLE_BUFFERS, AUD_THROW, AUD_OpenALHandle::buffers, AUD_DeviceSpecs::channels, AUD_OpenALHandle::current, AUD_OpenALHandle::data_end, AUD_OpenALHandle::format, AUD_DeviceSpecs::format, AUD_IReader::getSpecs(), i, AUD_OpenALHandle::isBuffered, AUD_OpenALHandle::keep, length(), lock(), AUD_OpenALHandle::loopcount, NULL, AUD_DeviceSpecs::rate, AUD_IReader::read(), AUD_OpenALHandle::reader, AUD_OpenALHandle::source, AUD_DeviceSpecs::specs, AUD_OpenALHandle::stop, AUD_OpenALHandle::stop_data, and unlock().
Referenced by play().
| AUD_Handle * AUD_OpenALDevice::play | ( | AUD_IFactory * | factory, |
| bool | keep = false |
||
| ) | [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. |
Implements AUD_IDevice.
Definition at line 645 of file AUD_OpenALDevice.cpp.
References AUD_ERROR_OPENAL, AUD_THROW, AUD_IFactory::createReader(), AUD_OpenALHandle::current, AUD_OpenALHandle::data_end, i, AUD_OpenALHandle::isBuffered, AUD_OpenALHandle::keep, lock(), AUD_OpenALHandle::loopcount, NULL, play(), AUD_OpenALHandle::source, AUD_OpenALHandle::stop, AUD_OpenALHandle::stop_data, and unlock().
| bool AUD_OpenALDevice::resume | ( | AUD_Handle * | handle | ) | [virtual] |
Resumes a paused sound.
| handle | The handle returned by the play function. |
Implements AUD_IDevice.
Definition at line 746 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::seek | ( | AUD_Handle * | handle, |
| float | position | ||
| ) | [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. |
Implements AUD_IDevice.
Definition at line 855 of file AUD_OpenALDevice.cpp.
References AUD_DEVICE_SAMPLE_SIZE, AUD_OPENAL_CYCLE_BUFFERS, AUD_OpenALHandle::buffers, AUD_OpenALHandle::current, AUD_OpenALHandle::data_end, err, AUD_OpenALHandle::format, AUD_IReader::getSpecs(), i, AUD_OpenALHandle::isBuffered, length(), lock(), AUD_Specs::rate, AUD_DeviceSpecs::rate, AUD_IReader::read(), AUD_OpenALHandle::reader, AUD_IReader::seek(), AUD_OpenALHandle::source, AUD_DeviceSpecs::specs, and unlock().
| bool AUD_OpenALDevice::setAttenuation | ( | AUD_Handle * | handle, |
| float | factor | ||
| ) | [virtual] |
Sets the attenuation of a source. This value is used for distance calculation.
| handle | The handle of the source. |
| factor | The new attenuation. |
Implements AUD_I3DDevice.
Definition at line 1548 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setConeAngleInner | ( | AUD_Handle * | handle, |
| float | angle | ||
| ) | [virtual] |
Sets the inner angle of the cone of a source.
| handle | The handle of the source. |
| angle | The new inner angle of the cone. |
Implements AUD_I3DDevice.
Definition at line 1602 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setConeAngleOuter | ( | AUD_Handle * | handle, |
| float | angle | ||
| ) | [virtual] |
Sets the outer angle of the cone of a source.
| handle | The handle of the source. |
| angle | The new outer angle of the cone. |
Implements AUD_I3DDevice.
Definition at line 1575 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setConeVolumeOuter | ( | AUD_Handle * | handle, |
| float | volume | ||
| ) | [virtual] |
Sets the outer volume of the cone of a source. The volume between inner and outer angle is interpolated between inner volume and this value.
| handle | The handle of the source. |
| volume | The new outer volume of the cone. |
Implements AUD_I3DDevice.
Definition at line 1629 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setDistanceMaximum | ( | AUD_Handle * | handle, |
| float | distance | ||
| ) | [virtual] |
Sets the maximum distance of a source. If a source is further away from the reader than this distance, the volume will automatically be set to 0.
| handle | The handle of the source. |
| distance | The new maximum distance. |
Implements AUD_I3DDevice.
Definition at line 1494 of file AUD_OpenALDevice.cpp.
| void AUD_OpenALDevice::setDistanceModel | ( | AUD_DistanceModel | model | ) | [virtual] |
Sets the distance model.
| model | distance model. |
Implements AUD_I3DDevice.
Definition at line 1285 of file AUD_OpenALDevice.cpp.
References AUD_DISTANCE_MODEL_EXPONENT, AUD_DISTANCE_MODEL_EXPONENT_CLAMPED, AUD_DISTANCE_MODEL_INVERSE, AUD_DISTANCE_MODEL_INVERSE_CLAMPED, AUD_DISTANCE_MODEL_LINEAR, and AUD_DISTANCE_MODEL_LINEAR_CLAMPED.
| bool AUD_OpenALDevice::setDistanceReference | ( | AUD_Handle * | handle, |
| float | distance | ||
| ) | [virtual] |
Sets the reference distance of a source.
| handle | The handle of the source. |
| distance | The new reference distance. |
Implements AUD_I3DDevice.
Definition at line 1521 of file AUD_OpenALDevice.cpp.
| void AUD_OpenALDevice::setDopplerFactor | ( | float | factor | ) | [virtual] |
Sets the doppler factor. This value is a scaling factor for the velocity vectors of sources and listener which is used while calculating the doppler effect.
| factor | The new doppler factor. |
Implements AUD_I3DDevice.
Definition at line 1259 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setKeep | ( | AUD_Handle * | handle, |
| bool | keep | ||
| ) | [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. |
Implements AUD_IDevice.
Definition at line 838 of file AUD_OpenALDevice.cpp.
| void AUD_OpenALDevice::setListenerLocation | ( | const AUD_Vector3 & | location | ) | [virtual] |
Sets the listener location.
| location | The new location. |
Implements AUD_I3DDevice.
Definition at line 1203 of file AUD_OpenALDevice.cpp.
References AUD_Vector3::get().
| void AUD_OpenALDevice::setListenerOrientation | ( | const AUD_Quaternion & | orientation | ) | [virtual] |
Sets the listener orientation.
| orientation | The new orientation as quaternion. |
Implements AUD_I3DDevice.
Definition at line 1226 of file AUD_OpenALDevice.cpp.
References AUD_Quaternion::w(), AUD_Quaternion::x(), AUD_Quaternion::y(), and AUD_Quaternion::z().
| void AUD_OpenALDevice::setListenerVelocity | ( | const AUD_Vector3 & | velocity | ) | [virtual] |
Sets the listener velocity.
| velocity | The new velocity. |
Implements AUD_I3DDevice.
Definition at line 1215 of file AUD_OpenALDevice.cpp.
References AUD_Vector3::get().
| bool AUD_OpenALDevice::setLoopCount | ( | AUD_Handle * | handle, |
| int | count | ||
| ) | [virtual] |
Sets the loop count of a playing sound. A negative value indicates infinity.
| handle | The sound handle. |
| count | The new loop count. |
Implements AUD_IDevice.
Definition at line 1048 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setPitch | ( | AUD_Handle * | handle, |
| float | pitch | ||
| ) | [virtual] |
Sets the pitch of a playing sound.
| handle | The sound handle. |
| pitch | The pitch. |
Implements AUD_IDevice.
Definition at line 1028 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setRelative | ( | AUD_Handle * | handle, |
| bool | relative | ||
| ) | [virtual] |
Sets whether the source location, velocity and orientation are relative to the listener.
| handle | The handle of the source. |
| relative | Whether the source is relative. |
Implements AUD_I3DDevice.
Definition at line 1412 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setSourceLocation | ( | AUD_Handle * | handle, |
| const AUD_Vector3 & | location | ||
| ) | [virtual] |
Sets the location of a source.
| handle | The handle of the source. |
| location | The new location. |
Implements AUD_I3DDevice.
Definition at line 1328 of file AUD_OpenALDevice.cpp.
References AUD_Vector3::get(), lock(), and unlock().
| bool AUD_OpenALDevice::setSourceOrientation | ( | AUD_Handle * | handle, |
| const AUD_Quaternion & | orientation | ||
| ) | [virtual] |
Sets the orientation of a source.
| handle | The handle of the source. |
| orientation | The new orientation as quaternion. |
Implements AUD_I3DDevice.
Definition at line 1376 of file AUD_OpenALDevice.cpp.
References lock(), unlock(), AUD_Quaternion::w(), AUD_Quaternion::x(), AUD_Quaternion::y(), and AUD_Quaternion::z().
| bool AUD_OpenALDevice::setSourceVelocity | ( | AUD_Handle * | handle, |
| const AUD_Vector3 & | velocity | ||
| ) | [virtual] |
Sets the velocity of a source.
| handle | The handle of the source. |
| velocity | The new velocity. |
Implements AUD_I3DDevice.
Definition at line 1357 of file AUD_OpenALDevice.cpp.
References AUD_Vector3::get(), lock(), and unlock().
| void AUD_OpenALDevice::setSpeedOfSound | ( | float | speed | ) | [virtual] |
Sets the speed of sound. This value is needed for doppler effect calculation.
| speed | The new speed of sound. |
Implements AUD_I3DDevice.
Definition at line 1249 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setStopCallback | ( | AUD_Handle * | handle, |
| stopCallback | callback = NULL, |
||
| void * | data = NULL |
||
| ) | [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. |
Implements AUD_IDevice.
Definition at line 1058 of file AUD_OpenALDevice.cpp.
References lock(), AUD_OpenALHandle::stop, AUD_OpenALHandle::stop_data, and unlock().
| void AUD_OpenALDevice::setVolume | ( | float | volume | ) | [virtual] |
Sets the overall device volume.
| handle | The sound handle. |
| volume | The overall device volume. |
Implements AUD_IDevice.
Definition at line 993 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setVolume | ( | AUD_Handle * | handle, |
| float | volume | ||
| ) | [virtual] |
Sets the volume of a playing sound.
| handle | The sound handle. |
| volume | The volume. |
Implements AUD_IDevice.
Definition at line 1008 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setVolumeMaximum | ( | AUD_Handle * | handle, |
| float | volume | ||
| ) | [virtual] |
Sets the maximum volume of a source.
| handle | The handle of the source. |
| volume | The new maximum volume. |
Implements AUD_I3DDevice.
Definition at line 1439 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::setVolumeMinimum | ( | AUD_Handle * | handle, |
| float | volume | ||
| ) | [virtual] |
Sets the minimum volume of a source.
| handle | The handle of the source. |
| volume | The new minimum volume. |
Implements AUD_I3DDevice.
Definition at line 1467 of file AUD_OpenALDevice.cpp.
| bool AUD_OpenALDevice::stop | ( | AUD_Handle * | handle | ) | [virtual] |
Stops a played back or paused sound. The handle is definitely invalid afterwards.
| handle | The handle returned by the play function. |
Implements AUD_IDevice.
Definition at line 771 of file AUD_OpenALDevice.cpp.
References AUD_OPENAL_CYCLE_BUFFERS, AUD_OpenALHandle::buffers, i, AUD_OpenALHandle::isBuffered, lock(), AUD_OpenALHandle::reader, AUD_OpenALHandle::source, and unlock().
Referenced by updateStreams().
| void AUD_OpenALDevice::unlock | ( | ) | [virtual] |
Unlocks the previously locked device.
Implements AUD_IDevice.
Definition at line 981 of file AUD_OpenALDevice.cpp.
Referenced by getAttenuation(), getConeAngleInner(), getConeAngleOuter(), getConeVolumeOuter(), getDistanceMaximum(), getDistanceReference(), getKeep(), getLoopCount(), getPitch(), getPosition(), getSourceLocation(), getSourceVelocity(), getStatus(), getVolume(), getVolumeMaximum(), getVolumeMinimum(), isRelative(), pause(), play(), resume(), seek(), setAttenuation(), setConeAngleInner(), setConeAngleOuter(), setConeVolumeOuter(), setDistanceMaximum(), setDistanceReference(), setKeep(), setLoopCount(), setPitch(), setRelative(), setSourceLocation(), setSourceOrientation(), setSourceVelocity(), setStopCallback(), setVolume(), setVolumeMaximum(), setVolumeMinimum(), stop(), updateStreams(), and ~AUD_OpenALDevice().
| void AUD_OpenALDevice::updateStreams | ( | ) |
Streaming thread main function.
Definition at line 131 of file AUD_OpenALDevice.cpp.
References AUD_DEVICE_SAMPLE_SIZE, AUD_OPENAL_CYCLE_BUFFERS, AUD_OpenALHandle::buffers, AUD_OpenALHandle::current, AUD_OpenALHandle::data_end, err, AUD_OpenALHandle::format, AUD_IReader::getSpecs(), AUD_OpenALHandle::isBuffered, AUD_OpenALHandle::keep, length(), lock(), AUD_OpenALHandle::loopcount, NULL, pause(), AUD_DeviceSpecs::rate, AUD_IReader::read(), AUD_OpenALHandle::reader, AUD_IReader::seek(), Sleep, AUD_OpenALHandle::source, AUD_DeviceSpecs::specs, AUD_OpenALHandle::stop, stop(), AUD_OpenALHandle::stop_data, and unlock().
Referenced by AUD_openalRunThread().