Eliminated an extra 64 sample skip from seeking when playing at the native sample rate
parent
be33e61644
commit
c07a38e59c
|
@ -423,11 +423,16 @@ blargg_err_t Spc_Emu::skip_( int count )
|
||||||
}
|
}
|
||||||
|
|
||||||
// eliminate pop due to resampler
|
// eliminate pop due to resampler
|
||||||
|
if ( sample_rate() != native_sample_rate )
|
||||||
|
{
|
||||||
const int resampler_latency = 64;
|
const int resampler_latency = 64;
|
||||||
sample_t buf [resampler_latency];
|
sample_t buf [resampler_latency];
|
||||||
return play_( resampler_latency, buf );
|
return play_( resampler_latency, buf );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return blargg_ok;
|
||||||
|
}
|
||||||
|
|
||||||
blargg_err_t Spc_Emu::play_( int count, sample_t out [] )
|
blargg_err_t Spc_Emu::play_( int count, sample_t out [] )
|
||||||
{
|
{
|
||||||
if ( sample_rate() == native_sample_rate )
|
if ( sample_rate() == native_sample_rate )
|
||||||
|
|
|
@ -532,12 +532,17 @@ blargg_err_t Sfm_Emu::skip_( int count )
|
||||||
filter.clear();
|
filter.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( sample_rate() != native_sample_rate )
|
||||||
|
{
|
||||||
// eliminate pop due to resampler
|
// eliminate pop due to resampler
|
||||||
const int resampler_latency = 64;
|
const int resampler_latency = 64;
|
||||||
sample_t buf [resampler_latency];
|
sample_t buf [resampler_latency];
|
||||||
return play_( resampler_latency, buf );
|
return play_( resampler_latency, buf );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return blargg_ok;
|
||||||
|
}
|
||||||
|
|
||||||
blargg_err_t Sfm_Emu::play_( int count, sample_t out [] )
|
blargg_err_t Sfm_Emu::play_( int count, sample_t out [] )
|
||||||
{
|
{
|
||||||
if ( sample_rate() == native_sample_rate )
|
if ( sample_rate() == native_sample_rate )
|
||||||
|
|
Loading…
Reference in New Issue