Companion
Functions
Attaches a processor function to the audio mixer, which will be called with the mixed audio data before it is played. The processor function can be used to modify the mixed audio data in real-time, such as applying effects or filters to the final output. The processor function should take a byte array as input, which will contain the mixed audio data to be processed. The size of the byte array will be equal to the number of frames requested by the audio mixer multiplied by the sample size and number of channels of the audio mixer.
Creates an audio stream with the specified sample rate, sample size, and number of channels. The created audio stream should be unloaded with AudioStream.unload when it is no longer needed.
Detaches the processor function from the audio mixer, which will stop calling the processor function with the mixed audio data before it is played. After calling this function, the audio mixer will no longer call the processor function and will play the mixed audio data without any modifications.
Sets the default buffer size for audio streams, which can be set to any positive integer value.