diff options
Diffstat (limited to 'src/audio/DMAudio.cpp')
-rw-r--r-- | src/audio/DMAudio.cpp | 23 |
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) { |