SoundDeviceBase
- class SoundDeviceBase[source]
Bases:
objectBase class for Sound Device interface.
- samplerate
Audio sample rate.
- Type:
int
- error
Error message.
- Type:
str
- __init__()
Methods
__init__()load(load, right)Loads sound data.
load_wav(file)Loads a WAV file.
play()Plays the loaded sound.
stop()Stops sound playback.
Attributes
- samplerate: int = 44100
- error: str = 'Error connecting to the sound_device '
- load(load: Any, right: Any) None[source]
Loads sound data.
- Parameters:
load (Any) – Left channel data or similar.
right (Any) – Right channel data.
- play() None[source]
Plays the loaded sound.
- stop() None[source]
Stops sound playback.
- load_wav(file: str) None[source]
Loads a WAV file.
- Parameters:
file (str) – Path or name of the WAV file.