From 38f4ea7aa3773e5fa9ff99fa131b7db223117009 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 24 Aug 2021 13:11:36 +0300 Subject: Audio enhancements: * redo high fps fix * make releasing vehicle sounds attach to entities * fix bug with reusing audio entity that is still being used * use time scale to modify sound speed --- src/audio/PolRadio.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/audio/PolRadio.cpp') diff --git a/src/audio/PolRadio.cpp b/src/audio/PolRadio.cpp index 553cf287..7688566b 100644 --- a/src/audio/PolRadio.cpp +++ b/src/audio/PolRadio.cpp @@ -260,7 +260,11 @@ cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel) default: freq = SampleManager.GetSampleBaseFrequency(sample); break; } PoliceChannelFreq = freq; +#ifdef USE_TIME_SCALE_FOR_AUDIO + SampleManager.SetChannelFrequency(CHANNEL_POLICE_RADIO, freq * CTimer::GetTimeScale()); +#else SampleManager.SetChannelFrequency(CHANNEL_POLICE_RADIO, freq); +#endif SampleManager.SetChannelVolume(CHANNEL_POLICE_RADIO, 100); SampleManager.SetChannelPan(CHANNEL_POLICE_RADIO, 63); #ifndef GTA_PS2 -- cgit v1.2.3