Handle¶
- class aud.Handle
Handle objects are playback handles that can be used to control playback of a sound. If a sound is played back multiple times then there are as many handles.
- attenuation
This factor is used for distance based attenuation of the source.
See also
Device.distance_model
- cone_angle_inner
The opening angle of the inner cone of the source. If the cone values of a source are set there are two (audible) cones with the apex at the
location
of the source and with infinite height, heading in the direction of the source’sorientation
. In the inner cone the volume is normal. Outside the outer cone the volume will becone_volume_outer
and in the area between the volume will be interpolated linearly.
- cone_angle_outer
The opening angle of the outer cone of the source.
See also
cone_angle_inner
- cone_volume_outer
The volume outside the outer cone of the source.
See also
cone_angle_inner
- distance_maximum
The maximum distance of the source. If the listener is further away the source volume will be 0.
See also
Device.distance_model
- distance_reference
The reference distance of the source. At this distance the volume will be exactly
volume
.See also
Device.distance_model
- keep
Whether the sound should be kept paused in the device when its end is reached. This can be used to seek the sound to some position and start playback again.
Warning
If this is set to true and you forget stopping this equals a memory leak as the handle exists until the device is destroyed.
- location
The source’s location in 3D space, a 3D tuple of floats.
- loop_count
The (remaining) loop count of the sound. A negative value indicates infinity.
- orientation
The source’s orientation in 3D space as quaternion, a 4 float tuple.
- pause()
- pause()¶
Pauses playback.
- Returns:
Whether the action succeeded.
- Return type:
bool
- pitch
The pitch of the sound.
- position
The playback position of the sound in seconds.
- relative
Whether the source’s location, velocity and orientation is relative or absolute to the listener.
- resume()
- resume()¶
Resumes playback.
- Returns:
Whether the action succeeded.
- Return type:
bool
- status
Whether the sound is playing, paused or stopped (=invalid).
- stop()
- stop()¶
Stops playback.
- Returns:
Whether the action succeeded.
- Return type:
bool
Note
This makes the handle invalid.
- velocity
The source’s velocity in 3D space, a 3D tuple of floats.
- volume
The volume of the sound.
- volume_maximum
The maximum volume of the source.
See also
Device.distance_model
- volume_minimum
The minimum volume of the source.
See also
Device.distance_model