![]() |
Blender V2.61 - r43446
|
Saves the data for playback. More...
#include <AUD_SoftwareDevice.h>

Public Member Functions | |
| AUD_SoftwareHandle (AUD_SoftwareDevice *device, AUD_Reference< AUD_IReader > reader, AUD_Reference< AUD_PitchReader > pitch, AUD_Reference< AUD_ResampleReader > resampler, AUD_Reference< AUD_ChannelMapperReader > mapper, bool keep) | |
| void | update () |
| void | setSpecs (AUD_Specs specs) |
| virtual | ~AUD_SoftwareHandle () |
| virtual bool | pause () |
| virtual bool | resume () |
| virtual bool | stop () |
| virtual bool | getKeep () |
| virtual bool | setKeep (bool keep) |
| virtual bool | seek (float position) |
| virtual float | getPosition () |
| virtual AUD_Status | getStatus () |
| virtual float | getVolume () |
| virtual bool | setVolume (float volume) |
| virtual float | getPitch () |
| virtual bool | setPitch (float pitch) |
| virtual int | getLoopCount () |
| virtual bool | setLoopCount (int count) |
| virtual bool | setStopCallback (stopCallback callback=0, void *data=0) |
| virtual AUD_Vector3 | getSourceLocation () |
| virtual bool | setSourceLocation (const AUD_Vector3 &location) |
| virtual AUD_Vector3 | getSourceVelocity () |
| virtual bool | setSourceVelocity (const AUD_Vector3 &velocity) |
| virtual AUD_Quaternion | getSourceOrientation () |
| virtual bool | setSourceOrientation (const AUD_Quaternion &orientation) |
| virtual bool | isRelative () |
| virtual bool | setRelative (bool relative) |
| virtual float | getVolumeMaximum () |
| virtual bool | setVolumeMaximum (float volume) |
| virtual float | getVolumeMinimum () |
| virtual bool | setVolumeMinimum (float volume) |
| virtual float | getDistanceMaximum () |
| virtual bool | setDistanceMaximum (float distance) |
| virtual float | getDistanceReference () |
| virtual bool | setDistanceReference (float distance) |
| virtual float | getAttenuation () |
| virtual bool | setAttenuation (float factor) |
| virtual float | getConeAngleOuter () |
| virtual bool | setConeAngleOuter (float angle) |
| virtual float | getConeAngleInner () |
| virtual bool | setConeAngleInner (float angle) |
| virtual float | getConeVolumeOuter () |
| virtual bool | setConeVolumeOuter (float volume) |
Public Attributes | |
| AUD_Reference< AUD_IReader > | m_reader |
| The reader source. | |
| AUD_Reference< AUD_PitchReader > | m_pitch |
| The pitch reader in between. | |
| AUD_Reference< AUD_ResampleReader > | m_resampler |
| The resample reader in between. | |
| AUD_Reference < AUD_ChannelMapperReader > | m_mapper |
| The channel mapper reader in between. | |
| bool | m_keep |
| Whether to keep the source if end of it is reached. | |
| float | m_user_pitch |
| The user set pitch of the source. | |
| float | m_user_volume |
| The user set volume of the source. | |
| float | m_user_pan |
| The user set panning for non-3D sources. | |
| float | m_volume |
| The calculated final volume of the source. | |
| int | m_loopcount |
| The loop count of the source. | |
| AUD_Vector3 | m_location |
| Location in 3D Space. | |
| AUD_Vector3 | m_velocity |
| Velocity in 3D Space. | |
| AUD_Quaternion | m_orientation |
| Orientation in 3D Space. | |
| bool | m_relative |
| Whether the position to the listener is relative or absolute. | |
| float | m_volume_max |
| Maximum volume. | |
| float | m_volume_min |
| Minimum volume. | |
| float | m_distance_max |
| Maximum distance. | |
| float | m_distance_reference |
| Reference distance;. | |
| float | m_attenuation |
| Attenuation. | |
| float | m_cone_angle_outer |
| Cone outer angle. | |
| float | m_cone_angle_inner |
| Cone inner angle. | |
| float | m_cone_volume_outer |
| Cone outer volume. | |
| int | m_flags |
| Rendering flags. | |
| stopCallback | m_stop |
| The stop callback. | |
| void * | m_stop_data |
| Stop callback data. | |
| AUD_Status | m_status |
| Current status of the handle. | |
| AUD_SoftwareDevice * | m_device |
| Own device. | |
Saves the data for playback.
Definition at line 58 of file AUD_SoftwareDevice.h.
| AUD_SoftwareDevice::AUD_SoftwareHandle::AUD_SoftwareHandle | ( | AUD_SoftwareDevice * | device, |
| AUD_Reference< AUD_IReader > | reader, | ||
| AUD_Reference< AUD_PitchReader > | pitch, | ||
| AUD_Reference< AUD_ResampleReader > | resampler, | ||
| AUD_Reference< AUD_ChannelMapperReader > | mapper, | ||
| bool | keep | ||
| ) |
Creates a new software handle.
| device | The device this handle is from. |
| reader | The reader to play. |
| pitch | The pitch reader. |
| resampler | The resampling reader. |
| mapper | The channel mapping reader. |
| keep | Whether to keep the handle when the sound ends. |
Definition at line 59 of file AUD_SoftwareDevice.cpp.
| virtual AUD_SoftwareDevice::AUD_SoftwareHandle::~AUD_SoftwareHandle | ( | ) | [inline, virtual] |
Definition at line 166 of file AUD_SoftwareDevice.h.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getAttenuation | ( | ) | [virtual] |
Retrieves the attenuation of a source.
Implements AUD_I3DHandle.
Definition at line 570 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getConeAngleInner | ( | ) | [virtual] |
Retrieves the inner angle of the cone of a source.
Implements AUD_I3DHandle.
Definition at line 611 of file AUD_SoftwareDevice.cpp.
References M_PI.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getConeAngleOuter | ( | ) | [virtual] |
Retrieves the outer angle of the cone of a source.
Implements AUD_I3DHandle.
Definition at line 593 of file AUD_SoftwareDevice.cpp.
References M_PI.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getConeVolumeOuter | ( | ) | [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.
Implements AUD_I3DHandle.
Definition at line 634 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getDistanceMaximum | ( | ) | [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.
Implements AUD_I3DHandle.
Definition at line 534 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getDistanceReference | ( | ) | [virtual] |
Retrieves the reference distance of a source.
Implements AUD_I3DHandle.
Definition at line 552 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::getKeep | ( | ) | [virtual] |
Gets the behaviour of the device for a played back sound when the sound doesn't return any more samples.
Implements AUD_IHandle.
Definition at line 300 of file AUD_SoftwareDevice.cpp.
| int AUD_SoftwareDevice::AUD_SoftwareHandle::getLoopCount | ( | ) | [virtual] |
Retrieves the loop count of a playing sound. A negative value indicates infinity.
Implements AUD_IHandle.
Definition at line 390 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getPitch | ( | ) | [virtual] |
Retrieves the pitch of a playing sound.
Implements AUD_IHandle.
Definition at line 377 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getPosition | ( | ) | [virtual] |
Retrieves the current playback position of a sound.
Implements AUD_IHandle.
Definition at line 336 of file AUD_SoftwareDevice.cpp.
| AUD_Vector3 AUD_SoftwareDevice::AUD_SoftwareHandle::getSourceLocation | ( | ) | [virtual] |
Retrieves the location of a source.
Implements AUD_I3DHandle.
Definition at line 426 of file AUD_SoftwareDevice.cpp.
| AUD_Quaternion AUD_SoftwareDevice::AUD_SoftwareHandle::getSourceOrientation | ( | ) | [virtual] |
Retrieves the orientation of a source.
Implements AUD_I3DHandle.
Definition at line 462 of file AUD_SoftwareDevice.cpp.
| AUD_Vector3 AUD_SoftwareDevice::AUD_SoftwareHandle::getSourceVelocity | ( | ) | [virtual] |
Retrieves the velocity of a source.
Implements AUD_I3DHandle.
Definition at line 444 of file AUD_SoftwareDevice.cpp.
| AUD_Status AUD_SoftwareDevice::AUD_SoftwareHandle::getStatus | ( | ) | [virtual] |
Returns the status of a played back sound.
Implements AUD_IHandle.
Definition at line 350 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getVolume | ( | ) | [virtual] |
Retrieves the volume of a playing sound.
Implements AUD_IHandle.
Definition at line 355 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getVolumeMaximum | ( | ) | [virtual] |
Retrieves the maximum volume of a source.
Implements AUD_I3DHandle.
Definition at line 498 of file AUD_SoftwareDevice.cpp.
| float AUD_SoftwareDevice::AUD_SoftwareHandle::getVolumeMinimum | ( | ) | [virtual] |
Retrieves the minimum volume of a source.
Implements AUD_I3DHandle.
Definition at line 516 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::isRelative | ( | ) | [virtual] |
Checks whether the source location, velocity and orientation are relative to the listener.
Implements AUD_I3DHandle.
Definition at line 480 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::pause | ( | ) | [virtual] |
Pauses a played back sound.
Implements AUD_IHandle.
Definition at line 225 of file AUD_SoftwareDevice.cpp.
References AUD_STATUS_PAUSED, and AUD_STATUS_PLAYING.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::resume | ( | ) | [virtual] |
Resumes a paused sound.
Implements AUD_IHandle.
Definition at line 250 of file AUD_SoftwareDevice.cpp.
References AUD_STATUS_PAUSED, and AUD_STATUS_PLAYING.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::seek | ( | float | position | ) | [virtual] |
Seeks in a played back sound.
| position | The new position from where to play back, in seconds. |
Implements AUD_IHandle.
Definition at line 322 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setAttenuation | ( | float | factor | ) | [virtual] |
Sets the attenuation of a source. This value is used for distance calculation.
| factor | The new attenuation. |
Implements AUD_I3DHandle.
Definition at line 578 of file AUD_SoftwareDevice.cpp.
References AUD_RENDER_DISTANCE.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setConeAngleInner | ( | float | angle | ) | [virtual] |
Sets the inner angle of the cone of a source.
| angle | The new inner angle of the cone. |
Implements AUD_I3DHandle.
Definition at line 619 of file AUD_SoftwareDevice.cpp.
References AUD_RENDER_CONE, and M_PI.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setConeAngleOuter | ( | float | angle | ) | [virtual] |
Sets the outer angle of the cone of a source.
| angle | The new outer angle of the cone. |
Implements AUD_I3DHandle.
Definition at line 601 of file AUD_SoftwareDevice.cpp.
References M_PI.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setConeVolumeOuter | ( | 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.
| volume | The new outer volume of the cone. |
Implements AUD_I3DHandle.
Definition at line 642 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setDistanceMaximum | ( | 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.
| distance | The new maximum distance. |
Implements AUD_I3DHandle.
Definition at line 542 of file AUD_SoftwareDevice.cpp.
References distance().
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setDistanceReference | ( | float | distance | ) | [virtual] |
Sets the reference distance of a source.
| distance | The new reference distance. |
Implements AUD_I3DHandle.
Definition at line 560 of file AUD_SoftwareDevice.cpp.
References distance().
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setKeep | ( | bool | keep | ) | [virtual] |
Sets the behaviour of the device for a played back sound when the sound doesn't return any more samples.
| keep | True when the source should be paused and not deleted. |
Implements AUD_IHandle.
Definition at line 308 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setLoopCount | ( | int | count | ) | [virtual] |
Sets the loop count of a playing sound. A negative value indicates infinity.
| count | The new loop count. |
Implements AUD_IHandle.
Definition at line 397 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setPitch | ( | float | pitch | ) | [virtual] |
Sets the pitch of a playing sound.
| pitch | The pitch. |
Implements AUD_IHandle.
Definition at line 382 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setRelative | ( | bool | relative | ) | [virtual] |
Sets whether the source location, velocity and orientation are relative to the listener.
| relative | Whether the source is relative. |
Implements AUD_I3DHandle.
Definition at line 488 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setSourceLocation | ( | const AUD_Vector3 & | location | ) | [virtual] |
Sets the location of a source.
| location | The new location. |
Implements AUD_I3DHandle.
Definition at line 434 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setSourceOrientation | ( | const AUD_Quaternion & | orientation | ) | [virtual] |
Sets the orientation of a source.
| orientation | The new orientation as quaternion. |
Implements AUD_I3DHandle.
Definition at line 470 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setSourceVelocity | ( | const AUD_Vector3 & | velocity | ) | [virtual] |
Sets the velocity of a source.
| velocity | The new velocity. |
Implements AUD_I3DHandle.
Definition at line 452 of file AUD_SoftwareDevice.cpp.
| void AUD_SoftwareDevice::AUD_SoftwareHandle::setSpecs | ( | AUD_Specs | specs | ) |
Sets the audio output specification of the readers.
| sepcs | The output specification. |
Definition at line 219 of file AUD_SoftwareDevice.cpp.
References AUD_Specs::channels, and AUD_Specs::rate.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setStopCallback | ( | stopCallback | callback = 0, |
| void * | data = 0 |
||
| ) | [virtual] |
Sets the callback function that's called when the end of a playing sound is reached.
| callback | The callback function. |
| data | The data that should be passed to the callback function. |
Implements AUD_IHandle.
Definition at line 405 of file AUD_SoftwareDevice.cpp.
References data.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setVolume | ( | float | volume | ) | [virtual] |
Sets the volume of a playing sound.
| volume | The volume. |
Implements AUD_IHandle.
Definition at line 360 of file AUD_SoftwareDevice.cpp.
References AUD_RENDER_VOLUME.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setVolumeMaximum | ( | float | volume | ) | [virtual] |
Sets the maximum volume of a source.
| volume | The new maximum volume. |
Implements AUD_I3DHandle.
Definition at line 506 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::setVolumeMinimum | ( | float | volume | ) | [virtual] |
Sets the minimum volume of a source.
| volume | The new minimum volume. |
Implements AUD_I3DHandle.
Definition at line 524 of file AUD_SoftwareDevice.cpp.
| bool AUD_SoftwareDevice::AUD_SoftwareHandle::stop | ( | ) | [virtual] |
Stops a played back or paused sound. The handle is definitely invalid afterwards.
Implements AUD_IHandle.
Definition at line 274 of file AUD_SoftwareDevice.cpp.
References AUD_STATUS_INVALID, and AUD_STATUS_PLAYING.
| void AUD_SoftwareDevice::AUD_SoftwareHandle::update | ( | ) |
Updates the handle's playback parameters.
Definition at line 67 of file AUD_SoftwareDevice.cpp.
References A, acos(), AUD_CHANNELS_MONO, AUD_DISTANCE_MODEL_EXPONENT, AUD_DISTANCE_MODEL_EXPONENT_CLAMPED, AUD_DISTANCE_MODEL_INVERSE, AUD_DISTANCE_MODEL_INVERSE_CLAMPED, AUD_DISTANCE_MODEL_LINEAR, AUD_DISTANCE_MODEL_LINEAR_CLAMPED, AUD_MAX, AUD_MIN, AUD_PITCH_MAX, AUD_RENDER_CONE, AUD_RENDER_DISTANCE, AUD_RENDER_DOPPLER, AUD_RENDER_VOLUME, distance(), AUD_Quaternion::getLookAt(), AUD_Quaternion::getUp(), AUD_Vector3::length(), M_PI, max, N, pow(), and sqrt().
Attenuation.
Definition at line 116 of file AUD_SoftwareDevice.h.
Cone inner angle.
Definition at line 122 of file AUD_SoftwareDevice.h.
Cone outer angle.
Definition at line 119 of file AUD_SoftwareDevice.h.
Cone outer volume.
Definition at line 125 of file AUD_SoftwareDevice.h.
Own device.
Definition at line 140 of file AUD_SoftwareDevice.h.
Maximum distance.
Definition at line 110 of file AUD_SoftwareDevice.h.
Reference distance;.
Definition at line 113 of file AUD_SoftwareDevice.h.
Rendering flags.
Definition at line 128 of file AUD_SoftwareDevice.h.
Whether to keep the source if end of it is reached.
Definition at line 74 of file AUD_SoftwareDevice.h.
Location in 3D Space.
Definition at line 92 of file AUD_SoftwareDevice.h.
The loop count of the source.
Definition at line 89 of file AUD_SoftwareDevice.h.
The channel mapper reader in between.
Definition at line 71 of file AUD_SoftwareDevice.h.
Orientation in 3D Space.
Definition at line 98 of file AUD_SoftwareDevice.h.
The pitch reader in between.
Definition at line 65 of file AUD_SoftwareDevice.h.
The reader source.
Definition at line 62 of file AUD_SoftwareDevice.h.
Whether the position to the listener is relative or absolute.
Definition at line 101 of file AUD_SoftwareDevice.h.
The resample reader in between.
Definition at line 68 of file AUD_SoftwareDevice.h.
Current status of the handle.
Definition at line 137 of file AUD_SoftwareDevice.h.
The stop callback.
Definition at line 131 of file AUD_SoftwareDevice.h.
Stop callback data.
Definition at line 134 of file AUD_SoftwareDevice.h.
The user set panning for non-3D sources.
Definition at line 83 of file AUD_SoftwareDevice.h.
Referenced by AUD_SoftwareDevice::setPanning().
The user set pitch of the source.
Definition at line 77 of file AUD_SoftwareDevice.h.
The user set volume of the source.
Definition at line 80 of file AUD_SoftwareDevice.h.
Velocity in 3D Space.
Definition at line 95 of file AUD_SoftwareDevice.h.
The calculated final volume of the source.
Definition at line 86 of file AUD_SoftwareDevice.h.
Maximum volume.
Definition at line 104 of file AUD_SoftwareDevice.h.
Minimum volume.
Definition at line 107 of file AUD_SoftwareDevice.h.