AbstractAudioPlayer Class

Inheritance diagram of AbstractAudioPlayer

class AbstractAudioPlayer(source_group, player)

Base class for driver audio players.

Constructor:

__init__(source_group, player)

Create a new audio player.

Parameters:
  • source_group (SourceGroup) – Source group to play from.
  • player (Player) – Player to receive EOS and video frame sync events.

Methods:

clear() Clear all buffered data and prepare for replacement data.
delete() Stop playing and clean up all resources used by player.
get_time() Return approximation of current playback time within current source.
play() Begin playback.
set_cone_inner_angle(cone_inner_angle) See Player.cone_inner_angle.
set_cone_orientation(cone_orientation) See Player.cone_orientation.
set_cone_outer_angle(cone_outer_angle) See Player.cone_outer_angle.
set_cone_outer_gain(cone_outer_gain) See Player.cone_outer_gain.
set_max_distance(max_distance) See Player.max_distance.
set_min_distance(min_distance) See Player.min_distance.
set_pitch(pitch) See Player.pitch.
set_position(position) See Player.position.
set_volume(volume) See Player.volume.
stop() Stop (pause) playback.

Methods

AbstractAudioPlayer.clear()

Clear all buffered data and prepare for replacement data.

The player should be stopped before calling this method.

AbstractAudioPlayer.delete()

Stop playing and clean up all resources used by player.

AbstractAudioPlayer.get_time()

Return approximation of current playback time within current source.

Returns None if the audio player does not know what the playback time is (for example, before any valid audio data has been read).

Return type:float
Returns:current play cursor time, in seconds.
AbstractAudioPlayer.play()

Begin playback.

AbstractAudioPlayer.set_cone_inner_angle(cone_inner_angle)

See Player.cone_inner_angle.

AbstractAudioPlayer.set_cone_orientation(cone_orientation)

See Player.cone_orientation.

AbstractAudioPlayer.set_cone_outer_angle(cone_outer_angle)

See Player.cone_outer_angle.

AbstractAudioPlayer.set_cone_outer_gain(cone_outer_gain)

See Player.cone_outer_gain.

AbstractAudioPlayer.set_max_distance(max_distance)

See Player.max_distance.

AbstractAudioPlayer.set_min_distance(min_distance)

See Player.min_distance.

AbstractAudioPlayer.set_pitch(pitch)

See Player.pitch.

AbstractAudioPlayer.set_position(position)

See Player.position.

AbstractAudioPlayer.set_volume(volume)

See Player.volume.

AbstractAudioPlayer.stop()

Stop (pause) playback.

Table Of Contents

Previous topic

AbstractAudioDriver Class

Next topic

AbstractListener Class