PCM DAC: fix muting
This commit is contained in:
parent
6985b85c09
commit
5fc36b1d4c
|
@ -30,7 +30,7 @@ void DivPlatformPCMDAC::acquire(short** buf, size_t len) {
|
||||||
const int depthScale=(15-outDepth);
|
const int depthScale=(15-outDepth);
|
||||||
int output=0;
|
int output=0;
|
||||||
for (size_t h=0; h<len; h++) {
|
for (size_t h=0; h<len; h++) {
|
||||||
if (!chan[0].active || isMuted) {
|
if (!chan[0].active) {
|
||||||
buf[0][h]=0;
|
buf[0][h]=0;
|
||||||
buf[1][h]=0;
|
buf[1][h]=0;
|
||||||
oscBuf->data[oscBuf->needle++]=0;
|
oscBuf->data[oscBuf->needle++]=0;
|
||||||
|
@ -171,7 +171,11 @@ void DivPlatformPCMDAC::acquire(short** buf, size_t len) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output=output*chan[0].vol*chan[0].envVol/16384;
|
if (isMuted) {
|
||||||
|
output=0;
|
||||||
|
} else {
|
||||||
|
output=output*chan[0].vol*chan[0].envVol/16384;
|
||||||
|
}
|
||||||
oscBuf->data[oscBuf->needle++]=output;
|
oscBuf->data[oscBuf->needle++]=output;
|
||||||
if (outStereo) {
|
if (outStereo) {
|
||||||
buf[0][h]=((output*chan[0].panL)>>(depthScale+8))<<depthScale;
|
buf[0][h]=((output*chan[0].panL)>>(depthScale+8))<<depthScale;
|
||||||
|
|
Loading…
Reference in New Issue