Dave: fix DAC when rate is higher than out rate

This commit is contained in:
tildearrow 2024-02-29 18:20:17 -05:00
parent 053967ea90
commit 6ab7bb3b4d

View file

@ -68,7 +68,7 @@ void DivPlatformDave::acquire(short** buf, size_t len) {
for (int i=4; i<6; i++) { for (int i=4; i<6; i++) {
if (chan[i].dacSample!=-1) { if (chan[i].dacSample!=-1) {
chan[i].dacPeriod+=chan[i].dacRate; chan[i].dacPeriod+=chan[i].dacRate;
if (chan[i].dacPeriod>rate) { while (chan[i].dacPeriod>rate) {
DivSample* s=parent->getSample(chan[i].dacSample); DivSample* s=parent->getSample(chan[i].dacSample);
if (s->samples<=0) { if (s->samples<=0) {
chan[i].dacSample=-1; chan[i].dacSample=-1;