zita-resampler: pass-through data if not configured
This is in preparation to allow fixed-speed processing without resampler latency
This commit is contained in:
parent
f02e8d34e3
commit
bb4a45ebaf
@ -169,7 +169,13 @@ VMResampler::process (void)
|
|||||||
double ph, dp;
|
double ph, dp;
|
||||||
float a, *p1, *p2;
|
float a, *p1, *p2;
|
||||||
|
|
||||||
if (!_table) return 1;
|
if (!_table) {
|
||||||
|
n = std::min (inp_count, out_count);
|
||||||
|
memcpy (out_data, inp_data, n * sizeof (float));
|
||||||
|
out_count -= n;
|
||||||
|
inp_count -= n;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
const int hl = _table->_hl;
|
const int hl = _table->_hl;
|
||||||
const unsigned int np = _table->_np;
|
const unsigned int np = _table->_np;
|
||||||
@ -208,6 +214,7 @@ VMResampler::process (void)
|
|||||||
out_count -= to_proc;
|
out_count -= to_proc;
|
||||||
in += to_proc;
|
in += to_proc;
|
||||||
if (in >= _inmax) {
|
if (in >= _inmax) {
|
||||||
|
// assert (_inmax == in)
|
||||||
memcpy (_buff, _buff + in, (2 * hl - 1) * sizeof (float));
|
memcpy (_buff, _buff + in, (2 * hl - 1) * sizeof (float));
|
||||||
in = 0;
|
in = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user