In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "Sndcore2.rpl"

From WiiUBrew
Jump to navigation Jump to search
(Initial commit, plan to add a lot more)
 
(Cleanup, finished initialization functions)
 
Line 11: Line 11:
 
|<code>void AXInit(void);</code>
 
|<code>void AXInit(void);</code>
 
|DEPRECATED, use AXInitWithParams
 
|DEPRECATED, use AXInitWithParams
 +
|-
 +
|AXInitWithParams
 +
|<code>AXINIT_ERROR AXInitWithParams(AXInitParams* params);</code>
 +
|Initializes the AX library for use.
 
|-
 
|-
 
|AXIsInit
 
|AXIsInit
 
|<code>bool AXIsInit(void);</code>
 
|<code>bool AXIsInit(void);</code>
 
|Checks if AX library is initialized.
 
|Checks if AX library is initialized.
|-
 
|AXInitWithParams
 
|<code>AXINIT_ERROR AXInitWithParams(AXInitParams* params);</code>
 
|Initializes the AX library for use.
 
 
|-
 
|-
 
|AXQuit
 
|AXQuit
 
|<code>void AXQuit(void);</code>
 
|<code>void AXQuit(void);</code>
 
|Shuts down the AX library.
 
|Shuts down the AX library.
|-
 
|AXGetRendererFreq
 
|<code>AX_RENDERER_FREQ AXGetRendererFreq(void);</code>
 
|Gets the renderer frequency.
 
 
|-
 
|-
 
|AXIsAudioOutReady
 
|AXIsAudioOutReady
 
|<code>bool AXIsAudioOutReady(void);</code>
 
|<code>bool AXIsAudioOutReady(void);</code>
 
|Checks if Audio Out is ready.
 
|Checks if Audio Out is ready.
 +
|-
 +
|AXGetCurrentParams
 +
|<code>void AXGetCurrentParams(AXInitParams* currParams);</code>
 +
|Gets the current parameters
 +
|-
 +
|AXGetInputSamplesPerFrame
 +
|<code>uint32_t AXGetInputSamplesPerFrame(void);</code>
 +
|Gets the number of samples per frame
 +
|-
 +
|AXGetInputSamplesPerSec
 +
|<code>uint32_t AXGetInputSamplesPerSec(void);</code>
 +
|Gets the number of samples per second
 
|}
 
|}
  
Line 40: Line 48:
 
!Prototype
 
!Prototype
 
|-
 
|-
|AXInitWithParams
+
|AXInitWithParams<br/>AXGetCurrentParams
 
|
 
|
 
<syntaxhighlight lang="C">
 
<syntaxhighlight lang="C">
Line 69: Line 77:
 
     AX_FRAMESIZE    frameSize;
 
     AX_FRAMESIZE    frameSize;
 
     AX_PIPELINE      pipeline;
 
     AX_PIPELINE      pipeline;
} AXINITPARAMS;
+
} AXInitParams;
 
</syntaxhighlight>
 
</syntaxhighlight>
 
|}
 
|}

Latest revision as of 08:20, 21 December 2015

sndcore2 is the core RPL for the Sound-2 library, consisting of the core AX functions. Other libraries like MIX, SYN, and SEQ are included in snduser2.rpl.

Functions

Initialization

Name Prototype Description
AXInit void AXInit(void); DEPRECATED, use AXInitWithParams
AXInitWithParams AXINIT_ERROR AXInitWithParams(AXInitParams* params); Initializes the AX library for use.
AXIsInit bool AXIsInit(void); Checks if AX library is initialized.
AXQuit void AXQuit(void); Shuts down the AX library.
AXIsAudioOutReady bool AXIsAudioOutReady(void); Checks if Audio Out is ready.
AXGetCurrentParams void AXGetCurrentParams(AXInitParams* currParams); Gets the current parameters
AXGetInputSamplesPerFrame uint32_t AXGetInputSamplesPerFrame(void); Gets the number of samples per frame
AXGetInputSamplesPerSec uint32_t AXGetInputSamplesPerSec(void); Gets the number of samples per second

Structures

Initialization

Name Prototype
AXInitWithParams
AXGetCurrentParams
typedef enum {
    AXINIT_OK = 0,
    AXINIT_ALREADY_INIT = -1,
    AXINIT_INVALID_RENDERER = -2,
    AXINIT_INVALID_FRAMESIZE = -3,
    AXINIT_INVALID_PIPELINE = -4
} AXINIT_ERROR;

typedef enum {
    AX_32K_RENDERER = 0,
    AX_48K_RENDERER = 1
} AX_RENDERER_FREQ;

typedef enum {
    AX_3MS_FRAME = 0
} AX_FRAMESIZE;

typedef enum {
    AX_SINGLE_PIPELINE = 0,
    AX_FOURSTAGE_PIPELINE = 1
} AX_PIPELINE;

typedef struct {
    AX_RENDERER_FREQ rendererFreq;
    AX_FRAMESIZE     frameSize;
    AX_PIPELINE      pipeline;
} AXInitParams;