Skip to content

audio::AudioHandler

Audio handler class.

Public Functions

Name
def init(self self)
Initialise the class.
def queue_audio(self self, audio_type audio_type, left left, right right)
Queue an audio file for playing.
def play_file(self self, filename filename, filetype filetype, left left, right right)
Actually play an audio file.
def loop(self self)
Perform the loop - check if the queue is empty, if not play the audio.

Public Attributes

Name
list directories
dictionary audio_files
dictionary audio_counters
dictionary audio_count
root
audio_queue

Public Functions Documentation

function init

def init(
    self self
)

Initialise the class.

function queue_audio

def queue_audio(
    self self,
    audio_type audio_type,
    left left,
    right right
)

Queue an audio file for playing.

function play_file

def play_file(
    self self,
    filename filename,
    filetype filetype,
    left left,
    right right
)

Actually play an audio file.

function loop

def loop(
    self self
)

Perform the loop - check if the queue is empty, if not play the audio.

Public Attributes Documentation

variable directories

static list directories =  [];

variable audio_files

static dictionary audio_files =  {};

variable audio_counters

static dictionary audio_counters =  {};

variable audio_count

static dictionary audio_count =  {};

variable root

static root =  os.path.dirname(__file__);

variable audio_queue

static audio_queue =  queue.Queue();

Updated on 2022-11-28 at 15:55:23 +0000