From 7d05958338aced539862bdb6d3096731fe025000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20B=C3=B6sing?= Date: Sat, 23 Jan 2016 16:05:55 +0100 Subject: [PATCH] rmv interleaving output --- reSID/sid.cc | 16 +++++++--------- reSID/sid.h | 10 ++++------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/reSID/sid.cc b/reSID/sid.cc index 3f74650..4e8bb4d 100644 --- a/reSID/sid.cc +++ b/reSID/sid.cc @@ -676,14 +676,14 @@ void SID::clock(cycle_count delta_t) // } // // ---------------------------------------------------------------------------- -int SID::clock(cycle_count& delta_t, short* buf, int n, int interleave) +int SID::clock(cycle_count& delta_t, short* buf, int n) { switch (sampling) { default: case SAMPLE_FAST: - return clock_fast(delta_t, buf, n, interleave); + return clock_fast(delta_t, buf, n); case SAMPLE_INTERPOLATE: - return clock_interpolate(delta_t, buf, n, interleave); + return clock_interpolate(delta_t, buf, n); } } @@ -691,8 +691,7 @@ int SID::clock(cycle_count& delta_t, short* buf, int n, int interleave) // SID clocking with audio sampling - delta clocking picking nearest sample. // ---------------------------------------------------------------------------- RESID_INLINE -int SID::clock_fast(cycle_count& delta_t, short* buf, int n, - int interleave) +int SID::clock_fast(cycle_count& delta_t, short* buf, int n) { int s = 0; @@ -708,7 +707,7 @@ int SID::clock_fast(cycle_count& delta_t, short* buf, int n, clock(delta_t_sample); delta_t -= delta_t_sample; sample_offset = (next_sample_offset & FIXP_MASK) - (1 << (FIXP_SHIFT - 1)); - buf[s++*interleave] = output(); + buf[s++] = output(); } clock(delta_t); @@ -728,8 +727,7 @@ int SID::clock_fast(cycle_count& delta_t, short* buf, int n, // sampling noise. // ---------------------------------------------------------------------------- RESID_INLINE -int SID::clock_interpolate(cycle_count& delta_t, short* buf, int n, - int interleave) +int SID::clock_interpolate(cycle_count& delta_t, short* buf, int n) { int s = 0; int i; @@ -755,7 +753,7 @@ int SID::clock_interpolate(cycle_count& delta_t, short* buf, int n, sample_offset = next_sample_offset & FIXP_MASK; short sample_now = output(); - buf[s++*interleave] = + buf[s++] = sample_prev + (sample_offset*(sample_now - sample_prev) >> FIXP_SHIFT); sample_prev = sample_now; } diff --git a/reSID/sid.h b/reSID/sid.h index 2d546c6..e0eb553 100644 --- a/reSID/sid.h +++ b/reSID/sid.h @@ -47,7 +47,7 @@ public: void clock(); void clock(cycle_count delta_t); - int clock(cycle_count& delta_t, short* buf, int n, int interleave = 1); + int clock(cycle_count& delta_t, short* buf, int n); void reset(); // Read/write registers. @@ -90,12 +90,10 @@ public: protected: - RESID_INLINE int clock_fast(cycle_count& delta_t, short* buf, int n, - int interleave); - RESID_INLINE int clock_interpolate(cycle_count& delta_t, short* buf, int n, - int interleave); + RESID_INLINE int clock_fast(cycle_count& delta_t, short* buf, int n); + RESID_INLINE int clock_interpolate(cycle_count& delta_t, short* buf, int n); - Voice voice[3]; + Voice voice[3]; Filter filter; ExternalFilter extfilt; Potentiometer potx;