Enums
Enums
ProcessingState
Bases: Enum
An enum representing the different processing states of CamillaDSP.
Source code in camilladsp\datastructures.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
INACTIVE = auto()
class-attribute
instance-attribute
CamillaDSP is inactive, and waiting for a new config to be supplied
PAUSED = auto()
class-attribute
instance-attribute
Processing is paused
RUNNING = auto()
class-attribute
instance-attribute
Processing is running
STALLED = auto()
class-attribute
instance-attribute
The processing is stalled because the capture device isn't providing any data
STARTING = auto()
class-attribute
instance-attribute
The processing is being set up
StopReason
Bases: Enum
An enum representing the possible reasons why CamillaDSP stopped processing. The StopReason enums carry additional data: - CAPTUREERROR and PLAYBACKERROR: Carries the error message as a string. - CAPTUREFORMATCHANGE and PLAYBACKFORMATCHANGE: Carries the estimated new sample rate as an integer. A value of 0 means the new rate is unknown.
The additional data can be accessed by reading the data
property.
reason = cdsp.general.stop_reason()
if reason == StopReason.CAPTUREERROR:
error_msg = reason.data
print(f"Capture failed, error: {error_msg}")
Source code in camilladsp\datastructures.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
|
CAPTUREERROR = auto()
class-attribute
instance-attribute
The capture device encountered an error.
CAPTUREFORMATCHANGE = auto()
class-attribute
instance-attribute
The sample format or rate of the capture device changed.
DONE = auto()
class-attribute
instance-attribute
The capture device reached the end of the stream.
NONE = auto()
class-attribute
instance-attribute
Processing is running and hasn't stopped yet.
PLAYBACKERROR = auto()
class-attribute
instance-attribute
The playback device encountered an error.
PLAYBACKFORMATCHANGE = auto()
class-attribute
instance-attribute
The sample format or rate of the playback device changed.
data
property
Getter for the data property
set_data(value)
Set the custom data property of the enum.
Source code in camilladsp\datastructures.py
96 97 98 99 100 |
|