summaryrefslogtreecommitdiff
path: root/src/audio/DMAudio.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-05-04 20:33:48 +0300
committerFire-Head <Fire-Head@users.noreply.github.com>2020-05-04 20:33:48 +0300
commit8aac6060d36c5dca48c02988b654d4646b175e64 (patch)
tree46dcd7597b7e75b4db1f17e469e0d7e6cb233c88 /src/audio/DMAudio.cpp
parent1180cc2947c27ce88c16c01acdc74eb9a9008a64 (diff)
oal upd
Diffstat (limited to 'src/audio/DMAudio.cpp')
-rw-r--r--src/audio/DMAudio.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 11c85dbd..8681f345 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -5,6 +5,7 @@
#include "AudioManager.h"
#include "AudioScriptObject.h"
#include "sampman.h"
+#include "Text.h"
cDMAudio DMAudio;
@@ -104,6 +105,28 @@ cDMAudio::Get3DProviderName(uint8 id)
return AudioManager.Get3DProviderName(id);
}
+int8 cDMAudio::AutoDetect3DProviders(void)
+{
+ for ( int32 i = 0; i < GetNum3DProvidersAvailable(); i++ )
+ {
+ wchar buff[64];
+
+ char *name = Get3DProviderName(i);
+ AsciiToUnicode(name, buff);
+ char *providername = UnicodeToAscii(buff);
+ strupr(providername);
+#if defined(AUDIO_MSS)
+ if ( !strcmp(providername, "MILES FAST 2D POSITIONAL AUDIO") )
+ return i;
+#elif defined(AUDIO_OAL)
+ if ( !strcmp(providername, "OPEANAL SOFT") )
+ return i;
+#endif
+ }
+
+ return -1;
+}
+
int8
cDMAudio::GetCurrent3DProviderIndex(void)
{