// number of samples to fill in buffer (Q20)\r
len = (cyc_to * Pico.snd.clkl_mult) - Pico.snd.dac_pos;\r
\r
- // don't do this too often (about once every 2 scanlines)\r
- if (len <= PicoIn.sndRate << 3) // Q16, (PicoIn.sndRate << 16) >> 13\r
- return;\r
-\r
// update position and calculate buffer offset and length\r
pos = (Pico.snd.dac_pos+0x80000) >> 20;\r
Pico.snd.dac_pos += len;\r
// number of samples to fill in buffer (Q20)\r
len = (cyc_to * Pico.snd.clkl_mult) - Pico.snd.psg_pos;\r
\r
- // don't do this too often (about once every 2 scanlines)\r
- if (len <= PicoIn.sndRate << 3) // Q16, (PicoIn.sndRate << 16) >> 13\r
- return;\r
-\r
// update position and calculate buffer offset and length\r
pos = (Pico.snd.psg_pos+0x80000) >> 20;\r
Pico.snd.psg_pos += len;\r
// number of samples to fill in buffer (Q20)\r
len = (cyc_to * Pico.snd.clkl_mult) - Pico.snd.ym2413_pos;\r
\r
- // don't do this too often (about once every 2 scanlines)\r
- if (len <= PicoIn.sndRate << 3) // Q16, (PicoIn.sndRate << 16) >> 13\r
- return;\r
-\r
// update position and calculate buffer offset and length\r
pos = (Pico.snd.ym2413_pos+0x80000) >> 20;\r
Pico.snd.ym2413_pos += len;\r
int pos, len;\r
int stereo = 0;\r
\r
- // Q16, number of samples since last call\r
+ // Q20, number of samples since last call\r
len = (cyc_to * Pico.snd.clkl_mult) - Pico.snd.fm_pos;\r
\r
- // don't do this too often (about once every 2 scanlines)\r
- if (len <= PicoIn.sndRate << 3) // Q16, (PicoIn.sndRate << 16) >> 13\r
- return;\r
-\r
// update position and calculate buffer offset and length\r
pos = (Pico.snd.fm_pos+0x80000) >> 20;\r
Pico.snd.fm_pos += len;\r
return length;\r
}\r
\r
- // Fill up DAC output in case of missing samples (Q16 rounding errors)\r
+ // Fill up DAC output in case of missing samples (Q rounding errors)\r
if (length-daclen > 0) {\r
short *dacbuf = PicoIn.sndOut + (daclen << stereo);\r
Pico.snd.dac_pos += (length-daclen) << 20;\r