AXInitWithParams

Syntax

#include <cafe/ax.h>

typedef struct {
   AX_RENDERER_FREQ_ENUM   rendererFreq;
   AX_FRAMESIZE_ENUM       frameSize;
   AX_PIPELINE_STAGES_ENUM pipelineStages;
} AXINITPARAMS;

AXINIT_ERROR_CODE AXInitWithParams(AXINITPARAMS *initParams);

Parameters

initParams Pointer to an AXINITPARAMS structure that provides the initial AX system settings.

Return Values

Returns a value of AXINIT_ERROR_CODE:

AXINIT_OK Success.
AXINIT_ALREADY_INITIALIZED If AX has already been initialized.
AXINIT_INVALID_RENDERER if( (params->rendererFreq != AX_32K_RENDERER) && (params->rendererFreq != AX_48K_RENDERER) )
AXINIT_INVALID_FRAMESIZE if( (params->frameSize != AX_3MS_FRAME ))
AXINIT_INVALID_PIPELINE_STAGE If( (params->pipelineStages != AX_SINGLE_PIPELINE_STAGE) && (params->pipelineStages != AX_FOUR_PIPELINE_STAGE) )

Description

Initializes the AX system and sets the renderer sample rate, frame size and pipeline stages based on user provided parameters. Currently it changes only renderer sample frequency and buffer mode. This function must be called before any other AX functions. The exception is AXIsInit, which can be used to determine if AXInitWithParams has already been invoked.

Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 No

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.
Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.

See Also

AXIsInit
AXQuit

Revision History

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