computed automatically when you call ::soundio_outstream_open
computed automatically when you call ::soundio_outstream_open
Populated automatically when you call ::soundio_outstream_create.
Optional callback. err is always SoundIoErrorStreaming. SoundIoErrorStreaming is an unrecoverable error. The stream is in an invalid state and must be destroyed. If you do not supply error_callback, the default callback will print a message to stderr and then call abort. This is called from the SoundIoOutStream::write_callback thread context.
Defaults to #SoundIoFormatFloat32NE, followed by the first one supported.
Defaults to Stereo, if available, followed by the first layout supported.
If setting the channel layout fails for some reason, this field is set to an error code. Possible error codes are: * #SoundIoErrorIncompatibleDevice
Optional: Name of the stream. Defaults to "SoundIoOutStream" PulseAudio uses this for the stream name. JACK uses this for the client name of the client that connects when you open the stream. WASAPI uses this for the session display name. Must not contain a colon (":").
Optional: Hint that this output stream is nonterminal. This is used by JACK and it means that the output stream data originates from an input stream. Defaults to false.
Sample rate is the number of frames per second. Defaults to 48000 (and then clamped into range).
Ignoring hardware latency, this is the number of seconds it takes for the last sample in a full buffer to be played. After you call ::soundio_outstream_open, this value is replaced with the actual software latency, as near to this value as possible. On systems that support clearing the buffer, this defaults to a large latency, potentially upwards of 2 seconds, with the understanding that you will call ::soundio_outstream_clear_buffer when you want to reduce the latency to 0. On systems that do not support clearing the buffer, this defaults to a reasonable lower latency value.
This optional callback happens when the sound device runs out of buffered audio data to play. After this occurs, the outstream waits until the buffer is full to resume playback. This is called from the SoundIoOutStream::write_callback thread context.
Defaults to NULL. Put whatever you want here.
Core Audio and WASAPI only: current output Audio Unit volume. Float, 0.0-1.0.
In this callback, you call ::soundio_outstream_begin_write and ::soundio_outstream_end_write as many times as necessary to write at minimum frame_count_min frames and at maximum frame_count_max frames. frame_count_max will always be greater than 0. Note that you should write as many frames as you can; frame_count_min might be 0 and you can still get a buffer underflow if you always write frame_count_min frames.
The size of this struct is not part of the API or ABI.