Menu

LIB_AUDIO

Benedict Jäggi

LIB_AUDIO

Import over appdata/CodeLibs/LIB_AUDIO.py

A library concerning sound and music.

def getSound(filepath)

Returns an AUDIOPLAYER loaded with the sound in filepath.

class AUDIOPLAYER

Holds a sound file and the functions to play, stop, pause and resume music generally and the given file specifically.

Returned by the getSound function.

def _ _ init _ _(self, filepath)

AUDIOPLAYER constructor.

Loads the file in filepath and maybe initializes the sound engine.

def play(self)

Plays the loaded file.

def stop(self)

Stop the actual playing music (must not be this one).

def switchpause(self)

Pauses or resumes the audio play, based on what is given before.

def pause(self)

Pauses the actual playing music.

def resume(self)

Resumes the actual paused music.

def isPlaying(self)

Returns if the music player is busy (playing sound, True) or not (False).


MongoDB Logo MongoDB