diff --git a/libctru/include/3ds/ndsp/channel.h b/libctru/include/3ds/ndsp/channel.h index 7cadd2d..e5b0f13 100644 --- a/libctru/include/3ds/ndsp/channel.h +++ b/libctru/include/3ds/ndsp/channel.h @@ -159,9 +159,9 @@ void ndspChnSetMix(int id, float mix[12]); /** * @brief Gets the mix parameters (volumes) of a channel. * @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. diff --git a/libctru/source/ndsp/ndsp-channel.c b/libctru/source/ndsp/ndsp-channel.c index b2ac176..7449e60 100644 --- a/libctru/source/ndsp/ndsp-channel.c +++ b/libctru/source/ndsp/ndsp-channel.c @@ -153,10 +153,10 @@ void ndspChnSetMix(int id, float mix[12]) LightLock_Unlock(&chn->lock); } -float* ndspChnGetMix(int id) +void ndspChnGetMix(int id, float mix[12]) { ndspChnSt* chn = &ndspChn[id]; - return chn->mix; + memcpy(mix, chn->mix, sizeof(mix)); } void ndspChnSetAdpcmCoefs(int id, u16 coefs[16])