fix read buffer length
This commit is contained in:
parent
6cefac3e2f
commit
eb62f26813
@ -100,7 +100,7 @@ static void dsp_thread()
|
||||
size_t read = sio_read(hdl, buf_in, sizeof(buf_in));
|
||||
float scale = powf(0.5f, SND_BITS-1);
|
||||
for(int i=0;i<SND_PCHAN;i++)
|
||||
for(int j=0;j<read;j++) {
|
||||
for(int j=0;j<read/sizeof(buf_in[0]);j++) {
|
||||
std::complex<float> rotated;
|
||||
rotated = (float)buf_in[j]*std::polar(scale, phase_in[i]*2.0f*(float)M_PI/(float)UINT32_MAX);
|
||||
phase_in[i] += ftw[i]; // wraps on underflow
|
||||
|
Loading…
Reference in New Issue
Block a user