mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-08 19:32:39 +08:00
Sound Blaster: Prevent GenerateDMASound() and goldplay DAC mode from conflicting with each other regarding rendering of audio data
This commit is contained in:
parent
0675a3ec0d
commit
33b531fb59
@ -598,6 +598,8 @@ static void GenerateDMASound(Bitu size) {
|
||||
// don't read if the DMA channel is masked
|
||||
if (sb.dma.chan->masked) return;
|
||||
|
||||
if (sb.dma_dac_mode) return;
|
||||
|
||||
if(sb.dma.autoinit) {
|
||||
if (sb.dma.left <= size) size = sb.dma.left;
|
||||
} else {
|
||||
@ -768,6 +770,7 @@ static void DMA_DAC_Event(Bitu val) {
|
||||
if (!sb.single_sample_dma) {
|
||||
// WARNING: This assumes Sound Blaster Pro emulation!
|
||||
LOG(LOG_SB,LOG_NORMAL)("Goldplay mode unexpectedly switched off, normal DMA playback follows");
|
||||
sb.dma_dac_mode = 0;
|
||||
sb.dma_dac_srcrate = sb.freq / (sb.mixer.stereo ? 2 : 1);
|
||||
sb.chan->SetFreq(sb.dma_dac_srcrate);
|
||||
updateSoundBlasterFilter(sb.dma_dac_srcrate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user