|
Audaspace
1.3.0
A high level audio library.
|
Saves the data for playback. More...
#include <SoftwareDevice.h>

Public Member Functions | |
| bool | pause (bool keep) |
| This method is for internal use only. More... | |
| SoftwareHandle (SoftwareDevice *device, std::shared_ptr< IReader > reader, std::shared_ptr< PitchReader > pitch, std::shared_ptr< ResampleReader > resampler, std::shared_ptr< ChannelMapperReader > mapper, bool keep) | |
| Creates a new software handle. More... | |
| void | update () |
| Updates the handle's playback parameters. | |
| void | setSpecs (Specs specs) |
| Sets the audio output specification of the readers. More... | |
| virtual bool | pause () |
| Pauses a played back sound. More... | |
| virtual bool | resume () |
| Resumes a paused sound. More... | |
| virtual bool | stop () |
| Stops a played back or paused sound. More... | |
| virtual bool | getKeep () |
| Gets the behaviour of the device for a played back sound when the sound doesn't return any more samples. More... | |
| virtual bool | setKeep (bool keep) |
| Sets the behaviour of the device for a played back sound when the sound doesn't return any more samples. More... | |
| virtual bool | seek (float position) |
| Seeks in a played back sound. More... | |
| virtual float | getPosition () |
| Retrieves the current playback position of a sound. More... | |
| virtual Status | getStatus () |
| Returns the status of a played back sound. More... | |
| virtual float | getVolume () |
| Retrieves the volume of a playing sound. More... | |
| virtual bool | setVolume (float volume) |
| Sets the volume of a playing sound. More... | |
| virtual float | getPitch () |
| Retrieves the pitch of a playing sound. More... | |
| virtual bool | setPitch (float pitch) |
| Sets the pitch of a playing sound. More... | |
| virtual int | getLoopCount () |
| Retrieves the loop count of a playing sound. More... | |
| virtual bool | setLoopCount (int count) |
| Sets the loop count of a playing sound. More... | |
| virtual bool | setStopCallback (stopCallback callback=0, void *data=0) |
| Sets the callback function that's called when the end of a playing sound is reached. More... | |
| virtual Vector3 | getLocation () |
| Retrieves the location of the source. More... | |
| virtual bool | setLocation (const Vector3 &location) |
| Sets the location of the source. More... | |
| virtual Vector3 | getVelocity () |
| Retrieves the velocity of the source. More... | |
| virtual bool | setVelocity (const Vector3 &velocity) |
| Sets the velocity of the source. More... | |
| virtual Quaternion | getOrientation () |
| Retrieves the orientation of the source. More... | |
| virtual bool | setOrientation (const Quaternion &orientation) |
| Sets the orientation of the source. More... | |
| virtual bool | isRelative () |
| Checks whether the source location, velocity and orientation are relative to the listener. More... | |
| virtual bool | setRelative (bool relative) |
| Sets whether the source location, velocity and orientation are relative to the listener. More... | |
| virtual float | getVolumeMaximum () |
| Retrieves the maximum volume of a source. More... | |
| virtual bool | setVolumeMaximum (float volume) |
| Sets the maximum volume of a source. More... | |
| virtual float | getVolumeMinimum () |
| Retrieves the minimum volume of a source. More... | |
| virtual bool | setVolumeMinimum (float volume) |
| Sets the minimum volume of a source. More... | |
| virtual float | getDistanceMaximum () |
| Retrieves the maximum distance of a source. More... | |
| virtual bool | setDistanceMaximum (float distance) |
| Sets the maximum distance of a source. More... | |
| virtual float | getDistanceReference () |
| Retrieves the reference distance of a source. More... | |
| virtual bool | setDistanceReference (float distance) |
| Sets the reference distance of a source. More... | |
| virtual float | getAttenuation () |
| Retrieves the attenuation of a source. More... | |
| virtual bool | setAttenuation (float factor) |
| Sets the attenuation of a source. More... | |
| virtual float | getConeAngleOuter () |
| Retrieves the outer opening angle of the cone of a source. More... | |
| virtual bool | setConeAngleOuter (float angle) |
| Sets the outer opening angle of the cone of a source. More... | |
| virtual float | getConeAngleInner () |
| Retrieves the inner opening angle of the cone of a source. More... | |
| virtual bool | setConeAngleInner (float angle) |
| Sets the inner opening angle of the cone of a source. More... | |
| virtual float | getConeVolumeOuter () |
| Retrieves the outer volume of the cone of a source. More... | |
| virtual bool | setConeVolumeOuter (float volume) |
| Sets the outer volume of the cone of a source. More... | |
Public Member Functions inherited from IHandle | |
| virtual | ~IHandle () |
| Destroys the handle. | |
Public Member Functions inherited from I3DHandle | |
| virtual | ~I3DHandle () |
| Destroys the handle. | |
Public Attributes | |
| std::shared_ptr< IReader > | m_reader |
| The reader source. | |
| std::shared_ptr< PitchReader > | m_pitch |
| The pitch reader in between. | |
| std::shared_ptr< ResampleReader > | m_resampler |
| The resample reader in between. | |
| std::shared_ptr< 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. | |
| float | m_old_volume |
| The previous calculated final volume of the source. | |
| int | m_loopcount |
| The loop count of the source. | |
| Vector3 | m_location |
| Location in 3D Space. | |
| Vector3 | m_velocity |
| Velocity in 3D Space. | |
| 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. | |
| Status | m_status |
| Current status of the handle. | |
| SoftwareDevice * | m_device |
| Own device. | |
Saves the data for playback.
| SoftwareDevice::SoftwareHandle::SoftwareHandle | ( | SoftwareDevice * | device, |
| std::shared_ptr< IReader > | reader, | ||
| std::shared_ptr< PitchReader > | pitch, | ||
| std::shared_ptr< ResampleReader > | resampler, | ||
| std::shared_ptr< 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. |
|
virtual |
|
virtual |
Retrieves the inner opening angle of the cone of a source.
The volume inside this cone is unaltered.
Implements I3DHandle.
|
virtual |
Retrieves the outer opening angle of the cone of a source.
Implements I3DHandle.
|
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 I3DHandle.
|
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 I3DHandle.
|
virtual |
|
virtual |
Gets the behaviour of the device for a played back sound when the sound doesn't return any more samples.
Implements IHandle.
|
virtual |
|
virtual |
Retrieves the loop count of a playing sound.
A negative value indicates infinity.
Implements IHandle.
|
virtual |
Retrieves the orientation of the source.
Implements I3DHandle.
|
virtual |
|
virtual |
Retrieves the current playback position of a sound.
Implements IHandle.
|
virtual |
Returns the status of a played back sound.
Implements IHandle.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Checks whether the source location, velocity and orientation are relative to the listener.
Implements I3DHandle.
| bool SoftwareDevice::SoftwareHandle::pause | ( | bool | keep | ) |
This method is for internal use only.
| keep | Whether the sound should be marked stopped or paused. |
|
virtual |
Pauses a played back sound.
Implements IHandle.
|
virtual |
Resumes a paused sound.
Implements IHandle.
|
virtual |
Seeks in a played back sound.
| position | The new position from where to play back, in seconds. |
Implements IHandle.
|
virtual |
Sets the attenuation of a source.
This value is used for distance calculation.
| factor | The new attenuation. |
Implements I3DHandle.
|
virtual |
Sets the inner opening angle of the cone of a source.
The volume inside this cone is unaltered.
| angle | The new inner angle of the cone. |
Implements I3DHandle.
|
virtual |
Sets the outer opening angle of the cone of a source.
| angle | The new outer angle of the cone. |
Implements I3DHandle.
|
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 I3DHandle.
|
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 I3DHandle.
|
virtual |
Sets the reference distance of a source.
| distance | The new reference distance. |
Implements I3DHandle.
|
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 IHandle.
|
virtual |
Sets the location of the source.
| location | The new location. |
Implements I3DHandle.
|
virtual |
Sets the loop count of a playing sound.
A negative value indicates infinity.
| count | The new loop count. |
Implements IHandle.
|
virtual |
Sets the orientation of the source.
| orientation | The new orientation as quaternion. |
Implements I3DHandle.
|
virtual |
Sets the pitch of a playing sound.
| pitch | The pitch. |
Implements IHandle.
|
virtual |
Sets whether the source location, velocity and orientation are relative to the listener.
| relative | Whether the source is relative. |
Implements I3DHandle.
| void SoftwareDevice::SoftwareHandle::setSpecs | ( | Specs | specs | ) |
Sets the audio output specification of the readers.
| specs | The output specification. |
|
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 IHandle.
|
virtual |
Sets the velocity of the source.
| velocity | The new velocity. |
Implements I3DHandle.
|
virtual |
Sets the volume of a playing sound.
| volume | The volume. |
Implements IHandle.
|
virtual |
Sets the maximum volume of a source.
| volume | The new maximum volume. |
Implements I3DHandle.
|
virtual |
Sets the minimum volume of a source.
| volume | The new minimum volume. |
Implements I3DHandle.
|
virtual |
Stops a played back or paused sound.
The handle is definitely invalid afterwards.
Implements IHandle.
1.8.14