AX API Migration Notes

A new, enhanced Sound-2 library has been introduced with a set of new features and performance improvements. It will replace the legacy sound-1 library after a short-term transition period. Refer to Sound Library for more information. This migration note guides you through AX API changes. To use sound-2 AX, developers should link to sndcore2.rpl instead of snd_core.rpl.

The tables below show the changes to AX programming interfaces.

Function Categories Sound1 Disposition Sound2 Migrate Example
Initialization AXInit Replace AXInitWithParams axsimple.c
AXIsInit Same AXIsInit -
AXQuit Same AXQuit -
AXIsAudioOutReady Same AXIsAudioOutReady -
AXInitEx Deprecate - -
AXInitSpecifyMem Deprecate - -
AXInitExSpecifyMem Deprecate - -
- New AXGetCurrentParams axsimple.c
- New AXGetInputSamplesPerFrame madpcmfeatures.c
- New AXGetInputSamplesPerSec axsimple.c
Voice Limit AXGetMaxVoices Same AXGetMaxVoices -
AXGetMaxDspVoices Same AXGetMaxDspVoices -
AXGetNumDspVoices Same AXGetNumDspVoices -
AXGetNumVoices Same AXGetNumVoices -
AXGetDroppedVoiceCount Same AXGetDroppedVoiceCount -
Mode AXGetDeviceMode Same AXGetDeviceMode -
- New AXGetRendererFreq axsimple.c
AXSetDeviceMode Deprecated - -
Process Limit AXGetDspLoadLimit Same AXGetDspLoadLimit -
AXGetDspLoad Same AXGetDspLoad -
AXGetPpcLoad Same AXGetPpcLoad -
AXGetPpcLoadLimit Same AXGetPpcLoadLimit -
Callback AXRegisterFrameCallback Same AXRegisterFrameCallback -
AXRegisterExceedCallback Same AXRegisterExceedCallback -
AXRegisterAuxCallback Same AXRegisterAuxCallback -
AXGetAuxCallback Same AXGetAuxCallback -
AXDeregisterAppFrameCallback Same AXDeregisterAppFrameCallback -
AXGetDeviceFinalMixCallback Same AXGetDeviceFinalMixCallback -
AXRegisterAppFrameCallback Same AXRegisterAppFrameCallback -
AXRegisterDeviceFinalMixCallback Same AXRegisterDeviceFinalMixCallback -
Volume AXSetDeviceVolume Same AXSetDeviceVolume -
AXGetDeviceVolume Same AXGetDeviceVolume -
AXGetAuxReturnVolume Same AXGetAuxReturnVolume -
AXSetAuxReturnVolume Same AXSetAuxReturnVolume -
Voice Parameter AXSetVoiceSrcType Same AXSetVoiceSrcType -
AXSetVoiceState Same AXSetVoiceState -
AXSetVoiceType Same AXSetVoiceType -
AXSetVoiceVe Same AXSetVoiceVe -
AXSetVoiceVeDelta Same AXSetVoiceVeDelta -
AXSetVoiceLoop Same AXSetVoiceLoop -
AXSetVoiceAdpcm Same AXSetVoiceAdpcm -
AXSetVoiceSrc Same AXSetVoiceSrc -
AXSetVoiceSrcRatio Same AXSetVoiceSrcRatio -
AXSetVoiceAdpcmLoop Same AXSetVoiceAdpcmLoop -
AXSetVoiceLpf Same AXSetVoiceLpf -
AXSetVoiceLpfCoefs Same AXSetVoiceLpfCoefs -
AXSetVoiceBiquad Same AXSetVoiceBiquad -
AXSetVoiceBiquadCoefs Same AXSetVoiceBiquadCoefs -
AXIsVoiceRunning Same AXIsVoiceRunning -
- New AXSetVoiceInitialTimeDelay axsimple.c
Mix Setting AXSetVoiceDeviceMix Same AXSetVoiceDeviceMix -
Sample Management AXGetVoiceLoopCount Same AXGetVoiceLoopCount -
AXSetVoiceOffsets Same AXSetVoiceOffsets -
AXSetVoiceLoopOffset Same AXSetVoiceLoopOffset -
AXSetVoiceEndOffset Same AXSetVoiceEndOffset -
AXSetVoiceCurrentOffset Same AXSetVoiceCurrentOffset -
AXGetVoiceOffsets Same AXGetVoiceOffsets -
AXSetVoiceSamplesAddr Same AXSetVoiceSamplesAddr -
AXCheckVoiceOffsets Same AXCheckVoiceOffsets -
AXGetVoiceCurrentOffsetEx Deprecated - -
AXSetVoiceCurrentOffsetEx Deprecated - -
AXSetVoiceLoopOffsetEx Deprecated - -
AXSetVoiceEndOffsetEx Deprecated - -
AXSetVoiceOffsetsEx Deprecated - -
AXGetVoiceOffsetsEx Deprecated - -
AXPrepareEfxData Deprecated - -
Profiling AXInitProfile Same AXInitProfile -
AXGetProfile Deprecated - -
AXGetSwapProfile Same AXGetSwapProfile -
Output AXMakeCompressorTable Same AXMakeCompressorTable -
AXSetDeviceCompressorTable Same AXSetDeviceCompressorTable -
AXSetDeviceCompressor Same AXSetDeviceCompressor -
AXGetDeviceFinalOutput Same AXGetDeviceFinalOutput -
AXGetDeviceRemixMatrix Same AXGetDeviceRemixMatrix -
AXGetDeviceUpsampleStage Same AXGetDeviceUpsampleStage -
AXSetDeviceLinearUpsampler Same AXSetDeviceLinearUpsampler -
AXSetDeviceRemixMatrix Same AXSetDeviceRemixMatrix -
AXSetDeviceUpsampleStage Same AXSetDeviceUpsampleStage -
Remote Voice Management AXSetVoiceRmtOn Same AXSetVoiceRmtOn -
AXSetVoiceRmtIIR Same AXSetVoiceRmtIIR -
AXSetVoiceRmtIIRCoefs Same AXSetVoiceRmtIIRCoefs -
AXRmtGetSamplesLeft Same AXRmtGetSamplesLeft -
AXRmtGetSamples Same AXRmtGetSamples -
AXRmtAdvancePtr Same AXRmtAdvancePtr -
ADPCM Utilities AXGetAdpcmOutputSize Same AXGetAdpcmOutputSize -
AXGetAdpcmWorkSize Same AXGetAdpcmWorkSize -
AXGetAdpcmData Same AXGetAdpcmData -
AXDecodeAdpcmData Same AXDecodeAdpcmData -
Voice Allocation AXAcquireVoice Same AXAcquireVoice -
AXFreeVoice Same AXFreeVoice -
AXSetVoicePriority Same AXSetVoicePriority -
AXAcquireVoiceEx Same AXAcquireVoiceEx -
Synchronization AXUserBegin Same AXUserBegin -
AXUserEnd Same AXUserEnd -
AXUserIsProtected Same AXUserIsProtected -
AXVoiceBegin Same AXVoiceBegin -
AXVoiceEnd Same AXVoiceEnd -
AXVoiceIsProtected Same AXVoiceIsProtected -
Renderer AXSetDefaultRenderer Same AXSetDefaultRenderer -
AXGetDefaultRenderer Same AXGetDefaultRenderer -
AXSetVoiceRenderer Same AXSetVoiceRenderer -
AXGetVoiceRenderer Same AXGetVoiceRenderer -
DRCVS AXSetDRCVSDownmixBalance Same AXSetDRCVSDownmixBalance -
AXSetDRCVSLC Same AXSetDRCVSLC -
AXSetDRCVSMode Same AXSetDRCVSMode -
AXSetDRCVSSurroundLevelGain Same AXSetDRCVSSurroundLevelGain -
AXSetDRCVSOutputGain Same AXSetDRCVSOutputGain -
AXSetDRCVSSpeakerPosition Same AXSetDRCVSSpeakerPosition -
AXSetDRCVSSurroundDepth Same AXSetDRCVSSurroundDepth -
AXGetDRCVSMode Same AXGetDRCVSMode -
AXSetDRCVSLimiter Same AXSetDRCVSLimiter -
AXSetDRCVSLimiterThreshold Same AXSetDRCVSLimiterThreshold -
Misc AXComputeLpfCoefs Same AXComputeLpfCoefs -
AXGetDeviceChannelCount Same AXGetDeviceChannelCount -

To maintain backward compatibility, the function interfaces for these deprecated APIs are still available in Sound-2, but they cannot access all the new features in Sound-2.

Column Disposition: (Migration from the version on its left to the version on its right)

Migration examples are commented in demo files under column Migrate Example. The demo directory is $CAFE_ROOT/system/src/demo/sound2.

Column of libraries (Sound1 and Sound2)

Revision History

2013/09/03 Clean up private APIs.
2013/07/30 Clean up to handle new 2.0 APIs.
2013/05/08 Automated cleanup pass.
2012/08/01 Cleanup Pass.
2012/01/26 Update to Audio API v2.0.
2011/02/21 Initial Version


CONFIDENTIAL