18 #define NDSP_CHANNELS(n) ((u32)(n) & 3)
20 #define NDSP_ENCODING(n) (((u32)(n) & 3) << 2)
void ndspChnWaveBufClear(int id)
Clears the wave buffer queue of a channel and stops playback.
void ndspChnInitParams(int id)
Initializes the parameters of a channel.
bool ndspChnIsPlaying(int id)
Checks whether a channel is currently playing.
u16 ndspChnGetFormat(int id)
Gets the format of a channel.
u16 ndspChnGetWaveBufSeq(int id)
Gets the sequence ID of the wave buffer that is currently playing in a channel.
void ndspChnIirMonoSetEnable(int id, bool enable)
Configures whether the IIR monopole filter of a channel is enabled.
@ NDSP_FRONT_BYPASS
Front bypass.
Definition: channel.h:36
@ NDSP_FORMAT_PCM16
(Alias) Buffer contains Mono PCM16.
Definition: channel.h:32
@ NDSP_FORMAT_ADPCM
(Alias) Buffer contains Mono ADPCM.
Definition: channel.h:33
@ NDSP_FORMAT_MONO_PCM8
Buffer contains Mono PCM8.
Definition: channel.h:25
@ NDSP_FORMAT_STEREO_PCM8
Buffer contains Stereo PCM8.
Definition: channel.h:28
@ NDSP_3D_SURROUND_PREPROCESSED
(?) Unknown, under research
Definition: channel.h:37
@ NDSP_FORMAT_STEREO_PCM16
Buffer contains Stereo PCM16.
Definition: channel.h:29
@ NDSP_FORMAT_MONO_ADPCM
Buffer contains Mono ADPCM.
Definition: channel.h:27
@ NDSP_FORMAT_MONO_PCM16
Buffer contains Mono PCM16.
Definition: channel.h:26
@ NDSP_FORMAT_PCM8
(Alias) Buffer contains Mono PCM8.
Definition: channel.h:31
void ndspChnSetMix(int id, float mix[12])
Sets the mix parameters (volumes) of a channel.
void ndspChnWaveBufAdd(int id, ndspWaveBuf *buf)
Adds a wave buffer to the wave buffer queue of a channel.
void ndspChnGetMix(int id, float mix[12])
Gets the mix parameters (volumes) of a channel.
@ NDSP_ENCODING_PCM16
PCM16.
Definition: channel.h:13
@ NDSP_ENCODING_ADPCM
DSPADPCM (GameCube format)
Definition: channel.h:14
@ NDSP_ENCODING_PCM8
PCM8.
Definition: channel.h:12
bool ndspChnIirMonoSetParamsCustomFilter(int id, float a0, float a1, float b0)
Manually sets up the parameters on monopole filter.
ndspInterpType ndspChnGetInterp(int id)
Gets the interpolation type of a channel.
ndspInterpType
Interpolation types.
Definition: channel.h:42
@ NDSP_INTERP_LINEAR
Linear interpolation.
Definition: channel.h:44
@ NDSP_INTERP_POLYPHASE
Polyphase interpolation.
Definition: channel.h:43
@ NDSP_INTERP_NONE
No interpolation.
Definition: channel.h:45
bool ndspChnIirBiquadSetParamsNotchFilter(int id, float f0, float Q)
Sets the biquad to be a notch filter.
#define NDSP_ENCODING(n)
Specifies the encoding used in a sample.
Definition: channel.h:20
void ndspChnSetRate(int id, float rate)
Sets the sample rate of a channel.
bool ndspChnIirBiquadSetParamsCustomFilter(int id, float a0, float a1, float a2, float b0, float b1, float b2)
Manually sets up the parameters of the biquad filter.
bool ndspChnIirBiquadSetParamsLowPassFilter(int id, float f0, float Q)
Sets the biquad to be a low pass filter.
void ndspChnSetFormat(int id, u16 format)
Sets the format of a channel.
void ndspChnReset(int id)
Resets a channel.
bool ndspChnIirMonoSetParamsHighPassFilter(int id, float f0)
Sets the monopole to be a high pass filter.
u32 ndspChnGetSamplePos(int id)
Gets the current sample position of a channel.
bool ndspChnIsPaused(int id)
Checks whether a channel is currently paused.
bool ndspChnIirBiquadSetParamsHighPassFilter(int id, float f0, float Q)
Sets the biquad to be a high pass filter.
bool ndspChnIirBiquadSetParamsPeakingEqualizer(int id, float f0, float Q, float gain)
Sets the biquad to be a peaking equalizer.
void ndspChnIirBiquadSetEnable(int id, bool enable)
Configures whether the IIR biquad filter of a channel is enabled.
#define NDSP_CHANNELS(n)
Specifies the number of channels used in a sample.
Definition: channel.h:18
bool ndspChnIirMonoSetParamsLowPassFilter(int id, float f0)
Sets the monopole to be a low pass filter.
void ndspChnSetInterp(int id, ndspInterpType type)
Sets the interpolation type of a channel.
void ndspChnSetPaused(int id, bool paused)
Sets the pause status of a channel.
void ndspChnSetAdpcmCoefs(int id, u16 coefs[16])
Sets the DSPADPCM coefficients of a channel.
bool ndspChnIirBiquadSetParamsBandPassFilter(int id, float f0, float Q)
Sets the biquad to be a band pass filter.
float ndspChnGetRate(int id)
Gets the sample rate of a channel.
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
uint32_t u32
32-bit unsigned integer
Definition: types.h:23