From 43017a3445f43d48f809f1eb332d1b64a79c5b7a Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Sat, 22 May 2004 07:51:33 +0000 Subject: [PATCH] fix persistent sounds (fans, etc) volume/pan info not being updated on win32 (d1x r1.11) --- ChangeLog | 3 +++ arch/win32/digi.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1342a4f8..c482bb9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-05-22 Matthew Mueller + * arch/win32/digi.c: fix persistent sounds (fans, etc) volume/pan + info not being updated on win32 (d1x r1.11) + * arch/win32/digi.c: remove some redundancy by not needing to do SoundSlots[i].playing = 0; in addition to DS_release_slot. Also clean up some indenting of DS_release_slot calls. And make diff --git a/arch/win32/digi.c b/arch/win32/digi.c index 51c098ed..0482cd0a 100644 --- a/arch/win32/digi.c +++ b/arch/win32/digi.c @@ -1,4 +1,4 @@ -/* $Id: digi.c,v 1.8 2004-05-22 07:42:18 btb Exp $ */ +/* $Id: digi.c,v 1.9 2004-05-22 07:51:33 btb Exp $ */ #define DIGI_SOUND #define MIDI_SOUND @@ -734,13 +734,17 @@ void digi_sync_sounds() digi_start_sound_object(i); } else { SoundSlots[SoundObjects[i].handle].volume = fixmuldiv(SoundObjects[i].volume,digi_volume,F1_0); + IDirectSoundBuffer_SetVolume(SoundSlots[SoundObjects[i].handle].lpsb, D1vol2DSvol(SoundSlots[SoundObjects[i].handle].volume)); } } } if (oldpan != SoundObjects[i].pan) { if (SoundObjects[i].flags & SOF_PLAYING) - SoundSlots[SoundObjects[i].handle].pan = SoundObjects[i].pan; + { + SoundSlots[SoundObjects[i].handle].pan = SoundObjects[i].pan; + IDirectSoundBuffer_SetPan(SoundSlots[SoundObjects[i].handle].lpsb, ((int)(f2fl(SoundObjects[i].pan) * 20000.0)) - 10000); + } } } } -- 2.39.2