double -> float
This commit is contained in:
parent
75f0393c7c
commit
4551324940
@ -72,7 +72,7 @@ static void dsp_thread()
|
||||
if(buf_out_idx == SND_BUFLEN*SND_PCHAN) {
|
||||
uint32_t ftw = frequency*(float)UINT32_MAX/SND_RATE;
|
||||
for(int i=0;i<SND_BUFLEN;i++) {
|
||||
buf_out[2*i] = buf_out[2*i+1] = (INT16_MAX-1)*sin(phase*2.0f*(float)M_PI/(float)UINT32_MAX);
|
||||
buf_out[2*i] = buf_out[2*i+1] = (INT16_MAX-1)*sinf(phase*2.0f*(float)M_PI/(float)UINT32_MAX);
|
||||
phase += ftw;
|
||||
}
|
||||
buf_out_idx = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user