diff --git a/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/SPU.cpp b/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/SPU.cpp index 00d0c325b..f754bf13b 100755 --- a/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/SPU.cpp +++ b/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/SPU.cpp @@ -717,7 +717,7 @@ static FORCEINLINE void Fetch8BitData(SPUInterpolationMode INTERPOLATE_MODE, NDS } *data = resampler_get_sample(chan->resampler); - resampler_remove_sample(chan->resampler); + resampler_remove_sample(chan->resampler, 1); } static FORCEINLINE void Fetch16BitData(SPUInterpolationMode INTERPOLATE_MODE, NDS_state *state, SPU_struct* const SPU, channel_struct *chan, s32 *data) @@ -746,7 +746,7 @@ static FORCEINLINE void Fetch16BitData(SPUInterpolationMode INTERPOLATE_MODE, ND } *data = resampler_get_sample(chan->resampler); - resampler_remove_sample(chan->resampler); + resampler_remove_sample(chan->resampler, 1); } static FORCEINLINE void FetchADPCMData(SPUInterpolationMode INTERPOLATE_MODE, NDS_state *state, SPU_struct* const SPU, channel_struct *chan, s32 *data) @@ -775,7 +775,7 @@ static FORCEINLINE void FetchADPCMData(SPUInterpolationMode INTERPOLATE_MODE, ND } *data = resampler_get_sample(chan->resampler); - resampler_remove_sample(chan->resampler); + resampler_remove_sample(chan->resampler, 1); } static FORCEINLINE void FetchPSGData(SPUInterpolationMode INTERPOLATE_MODE, channel_struct *chan, s32 *data) @@ -795,7 +795,7 @@ static FORCEINLINE void FetchPSGData(SPUInterpolationMode INTERPOLATE_MODE, chan */ *data = resampler_get_sample(chan->resampler); - resampler_remove_sample(chan->resampler); + resampler_remove_sample(chan->resampler, 1); } FORCEINLINE static void SPU_Mix(int CHANNELS, SPU_struct* SPU, channel_struct *chan, s32 data) diff --git a/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.c b/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.c index bcfc28f0a..377d4265c 100644 --- a/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.c +++ b/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.c @@ -349,7 +349,6 @@ void resampler_write_sample(void *_r, short s) if ( r->write_filled < resampler_buffer_size ) { float s32 = s; - s32 *= 256.0; r->buffer_in[ r->write_pos ] = s32; r->buffer_in[ r->write_pos + resampler_buffer_size ] = s32; diff --git a/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.h b/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.h index 0050ebf1a..dbde99266 100644 --- a/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.h +++ b/Frameworks/vio2sf/vio2sf/src/vio2sf/desmume/resampler.h @@ -23,6 +23,10 @@ #define resampler_remove_sample EVALUATE(RESAMPLER_DECORATE,_resampler_remove_sample) #endif +#ifdef __cplusplus +extern "C" { +#endif + void resampler_init(void); void * resampler_create(void); @@ -55,4 +59,8 @@ int resampler_get_sample(void *); float resampler_get_sample_float(void *); void resampler_remove_sample(void *, int decay); +#ifdef __cplusplus +} +#endif + #endif