carb::audio::StreamState

Defined in carb/audio/IAudioPlayback.h

enum class carb::audio::StreamState

names for the state of a stream used in the Streamer object.

These are returned from the writeData() function to indicate to the audio processing engine whether the processing rate needs to temporarily speed up or slow down (or remain the same). For non-real-time contexts, this would effectively always be requesting more data after each call. For real-time contexts however, if the streamer is writing the audio data to a custom device, these state values are used to prevent the device from being starved or overrun.

Values:

enumerator eNormal

indicates that the streamer is content with the current data production rate and that this rate should be maintained.

enumerator eCritical

indicates that the streamer is dangerously close to starving for data.

The audio processing engine should immediately run another cycle and produce more data.

enumerator eMore

indicates that the streamer is getting close to starving for data and the audio processing engine should temporarily increase its data production rate.

enumerator eLess

indicates that the streamer is getting close to overrunning and the audio processing engine should temporarily decrease its data production rate.

enumerator eMuchLess

indicates that the streamer is dangerously close to overrunning its buffer or device.

The audio processing engine should decrease its data production rate.