add ndspChnGet* methods

This commit is contained in:
TurtleP 2022-08-28 21:06:27 -04:00
parent 1ad959ba6b
commit 40896468e7
2 changed files with 4 additions and 4 deletions

View File

@ -159,9 +159,9 @@ void ndspChnSetMix(int id, float mix[12]);
/** /**
* @brief Gets the mix parameters (volumes) of a channel. * @brief Gets the mix parameters (volumes) of a channel.
* @param id ID of the channel (0..23) * @param id ID of the channel (0..23)
* @return The mix parameters. See \ref ndspChnSetMix. * @param mix Mix parameters to write out to. See \ref ndspChnSetMix.
*/ */
float* ndspChnGetMix(int id); void ndspChnGetMix(int id, float* mix[12]);
/** /**
* @brief Sets the DSPADPCM coefficients of a channel. * @brief Sets the DSPADPCM coefficients of a channel.

View File

@ -153,10 +153,10 @@ void ndspChnSetMix(int id, float mix[12])
LightLock_Unlock(&chn->lock); LightLock_Unlock(&chn->lock);
} }
float* ndspChnGetMix(int id) void ndspChnGetMix(int id, float mix[12])
{ {
ndspChnSt* chn = &ndspChn[id]; ndspChnSt* chn = &ndspChn[id];
return chn->mix; memcpy(mix, chn->mix, sizeof(mix));
} }
void ndspChnSetAdpcmCoefs(int id, u16 coefs[16]) void ndspChnSetAdpcmCoefs(int id, u16 coefs[16])