Core class for loading and play sound.
Note
Recording audio is not supported.
Bases: kivy.event.EventDispatcher
Represent a sound to play. This class is abstract, and cannot be used directly. Use SoundLoader to load a sound !
Events : |
|
---|
Get/set the filename/uri of the sound
Get length of the sound (in seconds)
Load the file into memory
Play the file
Seek to the <position> (in seconds)
Get the status of the sound (stop, play)
Stop playback
Unload the file from memory
Get/set the volume of the sound
Load a sound, with usage of the best loader for a given filename. If you want to load an audio file
sound = SoundLoader.load(filename='test.wav')
if not sound:
# unable to load this sound ?
pass
else:
# sound loaded, let's play!
sound.play()
Load a sound, and return a Sound() instance
Register a new class to load sound