Provide a mechanism for an audio chip to support multiple simultaneous streams
#include <audio_driver.h> int32_t ado_pcm_sw_mix ( ado_card_t *card, ado_pcm_t *pcm, ado_mixer_t *mixer );
The ado_pcm_sw_mix() function provides a mechanism whereby an audio chip that supports only one hardware PCM subchannel can support multiple simultaneous streams.
The number of streams supported is a function of the io-audio architecture and your driver can't change it. |
This function uses CPU power to mix the multiple streams together into one stream that it then sends to the PCM device.
The software mixer is implemented by creating a new PCM device attached to the card and creating the mixer controls for the new subchannel in the mixer specified.
The hardware subchannel is acquired only when the software mixer needs it, so it's possible for applications to open the hardware device directly, although this then prevents the software mixer from accepting a stream because the real hardware device is already in use.
Currently, software mixing is supported only on the playback channel of the PCM device.
Zero on success, or -1 if an error occurred.
QNX Neutrino
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | No |
Thread | No |