Merge pull request #895 from ShFil119/miami_audio

More audio
This commit is contained in:
shfil 2020-12-25 14:02:47 +01:00 committed by GitHub
commit dc72729a40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 334 additions and 264 deletions

View file

@ -20,7 +20,7 @@ const int allChannels = channels + 2;
cAudioManager::cAudioManager()
{
m_bIsInitialised = false;
field_1 = 1;
m_bReverb = true;
m_fSpeedOfSound = 6.86f;
m_nTimeSpent = 50;
m_nActiveSamples = NUM_SOUNDS_SAMPLES_SLOTS;
@ -426,7 +426,8 @@ cAudioManager::CheckForAnAudioFileOnCD() const
uint8
cAudioManager::GetCDAudioDriveLetter() const
{
return SampleManager.GetCDAudioDriveLetter();
if(m_bIsInitialised) return SampleManager.GetCDAudioDriveLetter();
return 0;
}
bool
@ -456,7 +457,7 @@ cAudioManager::ServiceSoundEffects()
ClearActiveSamples();
}
m_nActiveSampleQueue = m_nActiveSampleQueue == 1 ? 0 : 1;
ProcessReverb();
if(m_bReverb) ProcessReverb();
ProcessSpecial();
ClearRequestedQueue();
InterrogateAudioEntities();
@ -802,7 +803,7 @@ cAudioManager::AddReleasingSounds()
if (sample.m_nReleasingVolumeModificator < 20)
++sample.m_nReleasingVolumeModificator;
}
sample.m_bReleasingSoundFlag = 0;
sample.m_bReleasingSoundFlag = false;
}
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
AddSampleToRequestedQueue();