Amend last commit, fixing vio2sf.

CQTexperiment
Chris Moeller 2015-03-14 17:41:02 -07:00
parent d62a6463af
commit 3d15a63e91
3 changed files with 12 additions and 5 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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