Audio playback fix

Do not apply the receive mixer volume to the audio
samples read from files when the mixer is disabled.
pull/2/head
Stelios Bounanos 2008-01-16 13:57:04 +00:00
rodzic 0a0e32247b
commit 67c2c691aa
1 zmienionych plików z 10 dodań i 6 usunięć

Wyświetl plik

@ -495,9 +495,11 @@ int cSoundOSS::Read(double *buffer, int buffersize)
if (playback) {
readPlayback( buffer, buffersize);
double vol = valRcvMixer->value();
for (int i = 0; i < buffersize; i++)
buffer[i] *= vol;
if (progdefaults.EnableMixer) {
double vol = valRcvMixer->value();
for (int i = 0; i < buffersize; i++)
buffer[i] *= vol;
}
return buffersize;
}
@ -792,9 +794,11 @@ int cSoundPA::Read(double *buf, int count)
writeCapture(buf, count);
if (playback) {
readPlayback(buf, count);
double vol = valRcvMixer->value();
for (int i = 0; i < count; i++)
buf[i] *= vol;
if (progdefaults.EnableMixer) {
double vol = valRcvMixer->value();
for (int i = 0; i < count; i++)
buf[i] *= vol;
}
return count;
}