rmv interleaving output

master
Frank Bösing 8 years ago
parent 6b5d9e4609
commit 7d05958338
  1. 16
      reSID/sid.cc
  2. 10
      reSID/sid.h

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

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

Loading…
Cancel
Save