diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-11 20:07:12 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-11 20:07:12 +0200 |
commit | 0aa7f13c32ea1991f4663f5eff1c37478fdf736f (patch) | |
tree | a994ac3a72f9b65dfe6648d3086d4415fe2b1234 /src/audio/DMAudio.cpp | |
parent | little fix for cam (diff) | |
parent | remove aps from premake (diff) | |
download | re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.gz re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.bz2 re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.lz re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.xz re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.tar.zst re3-0aa7f13c32ea1991f4663f5eff1c37478fdf736f.zip |
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..f1b9707b 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, "OPENAL SOFT") ) + return i; +#endif + } + + return -1; +} + int8 cDMAudio::GetCurrent3DProviderIndex(void) { |