Sound-1 AX API Functions

Concepts

AX Overview Describes the audio features of the AX library.
AX Applications Overview Describes the AX level of abstraction, which is the lowest level of abstraction for the Cafe audio subsystem.
Rendering Model Describes the AX audio renderer at a conceptual level.
Programming Model Describes the basic procedure for playing a sound.
Load Balancing Describes how the AX library computes DSP and PPC load for each active voice and aux effect on a frame by frame basis, and uses the information to decide how to allocate the load.
Filtering Describes the two filters that are provided in the voice generation path to shape the voice.
Streaming Describes how audio streaming is used to play an arbitrarily large audio file without requiring more than two stream buffer blocks be loaded in to RAM at any given time.
Profiling Describes how profiling information is collected for audio processing.
Virtual Surround Describes the processing flow for the Wii U GamePad (DRC) virtual surround sound output.
Data Structures Outlines the AX data structures and definitions which occur throughout the API.
Output Modes Describes the output modes that AX supports for different devices.

Addressing

AXCheckVoiceOffsets Determines whether a given set of offsets describes a sample buffer that crosses the page boundary.
AXGetVoiceCurrentOffsetEx Returns the current playback offset in samples.
AXGetVoiceLoopCount Returns the number of times the voice has looped since acquisition.
AXGetVoiceOffsets Retrieves the current voice offset parameters from a voice parameter and places them into a AXPBOFFSET structure.
AXGetVoiceOffsetsEx Retrieves the current voice address parameters and places them into a referenced structure.
AXPrepareEfxData Ensures that the sound sample data pointed to is flushed to memory and accessible to the audio hardware.
AXSetVoiceCurrentOffset Applies a new location in the sound effect from which to continue rendering.
AXSetVoiceCurrentOffsetEx Applies a new location in a buffer from which to continue rendering.
AXSetVoiceEndOffset Specifies the end location offset for the given voice.
AXSetVoiceEndOffsetEx Specifies the end location offset for the given voice.
AXSetVoiceLoopOffset Applies the loop-start location offset for the specified voice.
AXSetVoiceLoopOffsetEx Applies the loop-start location offset for the specified voice.
AXSetVoiceOffsets Applies the parameters of addr to the voice p.
AXSetVoiceOffsetsEx Applies the parameters of addr to the voice p.
AXSetVoiceSamplesAddr Changes the effective base address in AXPBOFFSET structure of the voice.

ADPCM

AXDecodeAdpcmData Decodes DSP-ADPCM format data into monaural 16-bit PCM data (big-endian).
AXGetAdpcmData Encodes monaural 16-bit (big-endian) PCM data into DSP-ADPCM format so that it can be handled by an audio DSP.
AXGetAdpcmOutputSize Returns the size of DSP-ADPCM data output by the AXGetAdpcmData function.
AXGetAdpcmWorkSize Returns the size of working region used by the AXGetAdpcmData function.

Allocate

AXAcquireVoice Acquires a voice from AX on a priority basis.
AXAcquireVoiceEx Acquires a voice from AX on a priority basis.
AXFreeVoice Frees the voice specified by p.
AXSetVoicePriority Changes the priority for the specified voice.

Callbacks

AXDeregisterAppFrameCallback Deregisters an application callback function that was previously registered with AX.
AXGetAuxCallback Retrieves the callback function and its associated context pointer that are registered to Aux bus auxId for the output device that is specified by device and Id.
AXGetDeviceFinalMixCallback Retrieves the callback function registered to the specified device.
AXRegisterAppFrameCallback Registers an application callback function that AX invokes at each audio frame.
AXRegisterAuxCallback Registers callback function fcb to the Aux bus auxId, for the output device specified by device and Id.
AXRegisterDeviceFinalMixCallback Registers an application callback function that AX invokes at each audio frame after all the final mix for this device is performed.
AXRegisterFrameCallback Registers an application callback function that AX invokes once each audio frame.

Init

AXInit Initializes the AX library and the associated DSP and DMA hardware engines.
AXIsInit Verifies whether AX initialization occurred.
AXQuit Gracefully shuts down AX.
AXIsAudioOutReady Verifies that the system audio output setting is ready.

Limit

AXGetDroppedVoiceCount Reads the number of voices that were dropped during load allocation processing for the current frame.
AXGetDspLoad Reads the load that AX predicted for the DSP Renderer for the Audio Frame currently being rendered.
AXGetDspLoadLimit Reads the currently set limit for the amount of work per frame that will be given to the DSP for rendering.
AXGetMaxDspVoices Retrieves the maximum number of voices that AX can use for the DSP Renderer.
AXGetMaxVoices Retrieves the maximum number of voices that AX can use.
AXGetNumDspVoices Retrieves the total number of voices allocated for DSP rendering in the next frame.
AXGetNumVoices Retrieves the total number of voices allocated for rendering in the next frame.
AXGetPpcLoad Reads the load for the PPC Renderer that AX predicted for the Audio Frame currently being rendered.
AXGetPpcLoadLimit Reads the currently set limit per frame for the amount of work that will be given to the PPC for rendering.
AXRegisterExceedCallback Registers the callback when the DSP audio process does not complete within the 3 ms audio frame.

Miscellaneous

AXComputeLpfCoefs Computes and provides coefficient values for a0 and b0.
AXGetDeviceChannelCount Gets the number of active channels for the device

Mixing

AXSetVoiceDeviceMix Applies the mixing values in a mix structure to the output device of a voice.

Mode

AXGetDeviceMode Retrieves the current audio mode for a specified output device.
AXSetDeviceMode Sets the output mode for a specified device.
AXUpdateDeviceModes Updates the device modes for DRC and TV.

Output Stage

AXGetDeviceFinalOutput Copies the final output samples that are being pumped, if the size of the array provided by the user is large enough.
AXGetDeviceRemixMatrix Returns the matrix established by AXSetDeviceRemixMatrix for the specified device, for the given pairing of input and output channels.
AXGetDeviceUpsampleStage Returns whether the upsample stage is before or after the final mix callback.
AXMakeCompressorTable When the audio data in the mixing buffer overflows the range of an s16, the volume compressor applies the envelopes in the compressor table that is generated.
AXSetDeviceCompressor Turns the AX compressor ON or OFF.
AXSetDeviceCompressorTable Register a volume compressor table that is generated by AXMakeCompressorTable.
AXSetDeviceLinearUpsampler Set the flag to TRUE for the upsampler to work as a Linear interpolator. Set the flag to FALSE for the upsampler to work as a polyphase filter.
AXSetDeviceRemixMatrix Uses the matrix provided to upmix/downmix the final output that is destined for the specified device.
AXSetDeviceUpsampleStage User may select the final mix at 32kHz or 48kHz. Set upsample stage to post-final mix callback (FALSE) for users to get the final mix at 32kHz. Set it to pre-final mix callback (TRUE) for users to get the final mix at 48kHz.
AXGetDRCVSMode Gets the DRC VS processing mode set by AXSetDRCVSMode.
AXSetDRCVSMode Enables Virtual Surround for the Wii U GamePad if the user chooses SURROUND mode for the Wii U GamePad in the System Config Tool.
AXSetDRCVSLC Specify whether to use locked caches in DRC VS processing. Locked caches are not used by default.
AXSetDRCVSSpeakerPosition Positions virtual speakers for VS processing.
AXSetDRCVSSurroundDepth Specifies how much DRC VS processing should be used.
AXSetDRCVSDownmixBalance Sets the volume ratio of the down-mixing component to the VS component.
AXSetDRCVSSurroundLevelGain Specifies the surround channel level at the time of down-mixing.
AXSetDRCVSOutputGain Sets the volume for the VS component.

Parameter

AXIsVoiceRunning Checks the state of the specified voice.
AXSetVoiceAdpcm Applies the AXPBADPCM parameters to the specified voice.
AXSetVoiceAdpcmLoop Applies the AXPBADPCMLOOP parameters to the specified voice.
AXSetVoiceBiquad Applies the bi-quad filter parameters to the specified voice.
AXSetVoiceBiquadCoefs Applies the given filter coefficients to voice p.
AXSetVoiceLoop Sets the loop flag for a specified voice.
AXSetVoiceLpf Applies the low-pass filter (LPF) parameters for a specified voice.
AXSetVoiceLpfCoefs Applies low-pass filter (LPF) coefficients to an active voice.
AXSetVoiceSrc Initializes the front-end pitch bender (sample rate converter) for the specified voice.
AXSetVoiceSrcRatio Applies the given sample rate conversion ratio (pitch) to the voice p.
AXSetVoiceSrcType Selects the type of converter that will be used for SRC (pitch bending) for the specified voice.
AXSetVoiceState Sets the voice to run or stop.
AXSetVoiceType Applies type to the voice p.
AXSetVoiceVe Initializes the volume envelope for a voice.
AXSetVoiceVeDelta Applies a new volume envelope delta for the specified voice.

Profiling

AXGetProfile Returns the number of valid profiles recorded since the start of profiling, or since the last call to AXGetSwapProfile.
AXGetSwapProfile Provides an array of maxProfiles AXPROFILE data structures to the AX profiler, where the profiler measurements are recorded.
AXInitProfile Provides the initial array of AXPROFILE data structures to the AX profiler, where audio frame measurements are recorded. It also invokes the profiler, which continues to run for the duration of the application.

Remote

AXRmtAdvancePtr Advances the pointer in the Wii U remote audio buffer by the specified number of samples.
AXRmtGetSamples Copies rendered audio samples for controller chan into buffer.
AXRmtGetSamplesLeft Returns the number of rendered samples available for transfer to the Wii U remote controller audio output devices.
AXSetVoiceRmtIIR Initializes and enables the IIR filter for the Wii U remote output devices.
AXSetVoiceRmtIIRCoefs Initializes filter coefficient values for the Wii U remote controller output devices for voice p.
AXSetVoiceRmtOn Enables or disables rendering for Wii remote audio output devices. When a voice is acquired, audio rendering is disabled by default for Wii U remote controller audio output devices for the voice p.

Renderer

AXGetDefaultRenderer Retrieves the current default voice renderer.
AXGetVoiceRenderer Returns the currently selected voice rendering processor for the specified voice.
AXSetDefaultRenderer Specifies the default voice renderer for newly acquired voices.
AXSetVoiceRenderer Specifies the processor that will render the specified voice.

Synchronize

AXUserBegin Asserts a user-level protection state.
AXUserEnd Terminates a user-level protection state.
AXUserIsProtected Determines whether the general purpose user-level protection state is asserted for audio-related global data.
AXVoiceBegin Asserts a protection state for the specified voice.
AXVoiceEnd Terminates a voice-level protection state for the specified voice.
AXVoiceIsProtected Tests whether a voice is protected by any thread.

Volume

AXGetAuxReturnVolume Retrieves the return volume value for Aux bus auxId for the output device specified by device and Id.
AXGetDeviceVolume Retrieves the master volume for the output device specified by device and Id.
AXSetAuxReturnVolume Sets the return volume of Aux bus auxId for the output device specified by device and Id.
AXSetDeviceVolume Sets the master volume for the specified output device.



Revision History

2013/09/03 Clean up private APIs.
2013/08/26 Add new man pages.
2013/06/01 Initial version.


CONFIDENTIAL