summaryrefslogtreecommitdiff
path: root/src/audio/DMAudio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/DMAudio.cpp')
-rw-r--r--src/audio/DMAudio.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index 7174c23c..17963cc9 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -118,7 +118,12 @@ int8 cDMAudio::AutoDetect3DProviders(void)
for ( int32 i = 0; i < GetNum3DProvidersAvailable(); i++ )
{
wchar buff[64];
-
+
+#ifdef AUDIO_OAL
+ if (defaultProvider >= 0 && defaultProvider < GetNum3DProvidersAvailable()) {
+ return i;
+ }
+#endif
char *name = Get3DProviderName(i);
AsciiToUnicode(name, buff);
char *providername = UnicodeToAscii(buff);