DEADSOFTWARE

fixed music (all sounds, actually) muting after exiting in-game menu (stupid double...
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Thu, 7 Apr 2016 05:44:42 +0000 (08:44 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Thu, 7 Apr 2016 05:44:42 +0000 (08:44 +0300)
src/engine/e_sound.pas

index f24ea4892669bee23c7b6cb56dea6284af42f547..857101a017105c165b4ecdb5bd8db29e9533cd20 100644 (file)
@@ -578,6 +578,7 @@ begin
       if ChanSIds[i].muted then Mix_Volume(i, 0) else Mix_Volume(i, ChanSIds[i].oldvol);
     end;
   end;
+  //if SoundMuted then e_WriteLog('muting music', MSG_NOTIFY) else e_WriteLog(Format('unmuting music (%d)', [MusVolume]), MSG_NOTIFY);
   if SoundMuted then Mix_VolumeMusic(0) else Mix_VolumeMusic(MusVolume);
 end;
 
@@ -664,6 +665,7 @@ begin
   if (FID = NO_SOUND_ID) or not SoundInitialized then Exit;
   FChanNum := e_PlaySoundPanVolume(FID, Pan, Volume);
   Result := (FChanNum >= 0);
+  //if e_isMusic(FID) then e_WriteLog(Format('playing music (%u)', [FID]), MSG_NOTIFY);
   //TODO: aPos
 end;
 
@@ -744,6 +746,7 @@ var
   chan: Integer;
   pl: Boolean;
 begin
+  Enable := not Enable; // fuckin' double negation
   if e_isSound(FID) then
   begin
     chan := Channel;