fix buf_out index
This commit is contained in:
parent
7b4d0677a1
commit
36a2405f83
@ -87,7 +87,7 @@ static void dsp_thread()
|
||||
if(buf_out_offset == sizeof(buf_out)) {
|
||||
for(int i=0;i<SND_PCHAN;i++)
|
||||
for(int j=0;j<SND_BUFLEN;j++) {
|
||||
buf_out[2*j+i] = scale*sin(phase_out[i]*2.0*M_PI/(double)UINT32_MAX);
|
||||
buf_out[SND_PCHAN*j+i] = scale*sin(phase_out[i]*2.0*M_PI/(double)UINT32_MAX);
|
||||
phase_out[i] += ftw[i]; // wraps on overflow
|
||||
}
|
||||
buf_out_offset = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user