Basic package property configurations¶
This module provide a singleton object to hold configurations such as samplerate, blocksize and any relevant parameter that is necessary to the main Recorder and Player classes.
These values are used as default case and are available to any OsSom class that might need them.
Created on Sun Jun 28 21:40:13 2020
@author: João Vitor Gutkoski Paes
-
class
ossom.
Configurations
[source]¶ Global OsSom configurations.
-
__init__
()[source]¶ This class is a singleton, which means that any “new” instance is actually the same, pointed to by a new name.
>>> new_config = ossom.Configurations() >>> new_config is ossom.config True
Basically it provides a one time setup interface to convinently create `Recorder`s and `Player`s with only default parameters.
>>> rec1 = Recorder(samplerate=44100) >>> config.samplerate = 44100 >>> rec2 = Recorder() >>> rec1.samplerate == rec2.samplerate True
Returns: Return type: None.
-
samplerate
¶ Sample rate, or sampling frequency.
-
blocksize
¶ Size of audio chunk read on calls to next.
-
buffersize
¶ Total size of the audio buffer held by Recorder or Player objects.
-
dtype
¶ The audio data type.
-
channels
¶ Dictionary containing two lists that represents the device channels to be used. Zero indexed.
-
inChannels
¶ List of requested device input channels. Zero indexed.
-
outChannels
¶ List of requested device output channels. Zero indexed.
-