GetState(). You pass a callback function when creating a processor, and the SDK calls it whenever the processor transitions between states (for example, from INITIALIZING to READY, or to DISCONNECTED if the connection drops).
Without callbacks, you will not receive processor status updates automatically and will need to poll
GetState() manually. Callbacks are the recommended approach for handling state changes.Callback Signature
| Parameter | Type | Description |
|---|---|---|
state | int | A ProcessorState enum value |
reason | string | A human-readable reason for the state change |
Example
Define a callback function and pass it when creating a processor. The SDK will call it whenever the processor state changes:See Also
ProcessorState
All possible state values your callback can receive
RemoteSDK
The
CreateAudioProcessor() method accepts the callback parameter