The Multi Voice API allows grouping and controlling of up to six voices simultaneously for playing audio on Cafe.
The following describes the audio features of the AX library related to multi voice processing. Up to six audio voices can be managed with calls similar to the standard voice processing calls. If for whatever reason one or more of the grouped voices fail internally to their respective single voice equivalent calls, then the multi voice call will fail gracefully. For example, if a multi voice, with six grouped voices, needs to be acquired but only five voices are available from the AX system for allocation, then the multi voice acquire call will fail without using any of the five remaining resources.
For an overview of the process that AX performs to render sounds, see the Rendering Model reference.
Information about programming applications to use AX can be found in the Programming Model reference.
See the AX Overview for information on AX system parameters that also apply to single voice parameters.
An in-memory Multi-ADPCM Features Demo demonstrates how to use the multi-voice API.
A streaming Multi-ADPCM Streaming Demo demonstrates how to use the multi-voice API for streaming mdsp files.
To play multi-voice audio, applications must acquire and configure multi-voices as follows:
When acquiring a voice, a priority value must be provided. If the maximum number of voices has already been acquired, AX will look for the voices with the lowest priority. If the old voices' priority is lower than the priority requested for the new multi-voice, the old voices will be forcibly freed to make room for the new one.
The priority of a voice is also used by the load balancer. Voices with higher priority are assigned a renderer first. If the maximum load is reached, voices with lower priority will be dropped.
The type of a voice may be either normal or streamed.
This parameter is only used if the voice is playing multi-DSP-ADPCM data.
When a normal multi-DSP-ADPCM format voice loops, a couple of decompression parameters
yn2) for each voice are updated to ensure correct playback.
When streaming, multi-voices may use AX's looping mechanism to jump between sample buffers as audio is played.
In the streaming case, the decompression parameters should not be updated when "looping" to another buffer.
Setting a multi-voice's type to streamed tells AX not to update these
parameters when the voice's loop point is reached.
This allows multi-DSP-ADPCM voices to use AX's looping mechanism for streaming.
The ADPCM parameters of a voice configure it for playback of multi-DSP-ADPCM format audio. These parameters must be set according to the headers of a multi-DSP-ADPCM file. When playing PCM data, it is not necessary to set these parameters.
For more information about the multi-DSP-ADPCM format, see the Multi-DSPADPCM Tool reference.
The address parameters of a multi-voice control the memory location from which the voice's sample data is read from. The address parameters include the sample buffer location and offsets for the current playback position, buffer end, and loop point.
Sample rate conversion, or SRC, controls the rate at which a multi-voice plays back its samples. This can be used to correct the case where a sample buffer's sample rate does not match the the AX mixing rate of 32KHz or 48KHz. It may also be used to perform pitch bending.
The mix of a multi-voice controls its output volume for each channel of each bus of each device. After voice generation has completed, this controls the volume at which the multi-voice is sent to each output channels. For more information, see the Rendering Model's mixing section.
In other terms, a multi-voice's mix controls how loudly it applies to all of its audio channels. The volume is the same across each channel. AX provides only basic volume settings for all channels at the same time.
The volume envelope of a multi-voice sets the input volumes of an AX multi-voice. This volume modifier applies before any other effects are applied. The volume envelope also allows control over volume ramping within a single audio frame to avoid zipping and popping artifacts.
A multi-voice's State controls whether the multi-voice is playing or is stopped. If a non-looping multi-voice reaches the end of its sample buffer, it is automatically stopped.
The low pass filter, or LPF, is a built-in filter that may be enabled for each voice in a multi-voice. It suppresses the volume of the higher frequencies in a sound.
For more information, see the Filtering reference.
The biquad filter is a built-in filter that may be enabled for each voice in the multi-voice. It suppresses different frequencies based on how it is configured. It is possible to configure a biquad filter to act as a low pass, high pass, or band pass filter. For more details, see Filtering reference.
2014/02/27 Initial Version