summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 18:16:37 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 18:16:37 +0200
commita6aa782d6d5fa9a2165dafec5794a2e2cfbc653f (patch)
treedea344ffa5b7073b94b94a35dee13519fbc04b82 /src/audio/AudioManager.cpp
parentUpload to bintray when creating tags (diff)
downloadre3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.gz
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.bz2
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.lz
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.xz
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.tar.zst
re3-a6aa782d6d5fa9a2165dafec5794a2e2cfbc653f.zip
Diffstat (limited to '')
-rw-r--r--src/audio/AudioManager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index a42aa16f..d8054181 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -321,8 +321,13 @@ cAudioManager::Get3DProviderName(uint8 id) const
{
if (!m_bIsInitialised)
return nil;
+#ifdef AUDIO_OAL
+ id = clamp(id, 0, SampleManager.GetNum3DProvidersAvailable() - 1);
+#else
+ // We don't want that either since it will crash the game, but skipping for now
if (id >= SampleManager.GetNum3DProvidersAvailable())
return nil;
+#endif
return SampleManager.Get3DProviderName(id);
}