libteak
Functions
btdmp.h File Reference

BTDMP (speakers/microphone FIFO). More...

#include <teak/types.h>

Functions

void btdmpDisableInput (int channel)
 Disables audio recording from a BTDMP channel. More...
 
void btdmpDisableOutput (int channel)
 Disables audio output from a BTDMP channel. More...
 
static int btdmpReceiveFifoEmpty (int channel)
 Checks if the receive FIFO of a BTDMP channel is empty or not. More...
 
void btdmpSetupInputMicrophone (int channel, int irq_index)
 Setups a BTDMP channel to record audio from the DS microphone. More...
 
void btdmpSetupOutputSpeakers (int channel, int irq_index)
 Setups a BTDMP channel to output audio to the DS speakers. More...
 
static int btdmpTransmitFifoFull (int channel)
 Checks if the transmit FIFO of a BTDMP channel is full or not. More...
 

Detailed Description

BTDMP (speakers/microphone FIFO).

Function Documentation

◆ btdmpDisableInput()

void btdmpDisableInput ( int  channel)

Disables audio recording from a BTDMP channel.

Parameters
channelThe BTDMP channel to disable.

◆ btdmpDisableOutput()

void btdmpDisableOutput ( int  channel)

Disables audio output from a BTDMP channel.

Parameters
channelThe BTDMP channel to disable.

◆ btdmpReceiveFifoEmpty()

static int btdmpReceiveFifoEmpty ( int  channel)
inlinestatic

Checks if the receive FIFO of a BTDMP channel is empty or not.

Parameters
channelThe BTDMP channel to check.
Returns
1 if the FIFO is empty, 0 otherwise.

◆ btdmpSetupInputMicrophone()

void btdmpSetupInputMicrophone ( int  channel,
int  irq_index 
)

Setups a BTDMP channel to record audio from the DS microphone.

Note: Remember to power on the microphone from the ARM7. You can run this in the ARM9 to do it:

soundMicPowerOn();

And you can run this to power it off when you're no longer recording:

soundMicPowerOff();
Parameters
channelThe BTDMP channel to use.
irq_indexThe CPU interrupt to use (0 to 2).

◆ btdmpSetupOutputSpeakers()

void btdmpSetupOutputSpeakers ( int  channel,
int  irq_index 
)

Setups a BTDMP channel to output audio to the DS speakers.

Note: Remember to setup REG_SNDEXTCNT from the ARM7 to enable sound output from the DSP. For example, for 50% DSP output and 50% ARM7 output, run this on the ARM9:

soundExtSetRatio(4);
Parameters
channelThe BTDMP channel to use.
irq_indexThe CPU interrupt to use (0 to 2).

◆ btdmpTransmitFifoFull()

static int btdmpTransmitFifoFull ( int  channel)
inlinestatic

Checks if the transmit FIFO of a BTDMP channel is full or not.

Parameters
channelThe BTDMP channel to check.
Returns
1 if the FIFO is full, 0 otherwise.