diff options
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llfloaterabout.cpp | 5 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 45 |
2 files changed, 23 insertions, 27 deletions
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index 4704c5b..6bd2c41 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp | |||
@@ -41,6 +41,7 @@ | |||
41 | 41 | ||
42 | #include "llcurl.h" | 42 | #include "llcurl.h" |
43 | #include "llimagej2c.h" | 43 | #include "llimagej2c.h" |
44 | #include "audioengine.h" | ||
44 | 45 | ||
45 | #include "llviewertexteditor.h" | 46 | #include "llviewertexteditor.h" |
46 | #include "llviewercontrol.h" | 47 | #include "llviewercontrol.h" |
@@ -200,6 +201,10 @@ LLFloaterAbout::LLFloaterAbout() | |||
200 | support.append( LLImageJ2C::getEngineInfo() ); | 201 | support.append( LLImageJ2C::getEngineInfo() ); |
201 | support.append("\n"); | 202 | support.append("\n"); |
202 | 203 | ||
204 | support.append("Audio Driver Version: "); | ||
205 | support.append( gAudiop ? gAudiop->getDriverName(true) : "(none)" ); | ||
206 | support.append("\n"); | ||
207 | |||
203 | LLMediaManager *mgr = LLMediaManager::getInstance(); | 208 | LLMediaManager *mgr = LLMediaManager::getInstance(); |
204 | if (mgr) | 209 | if (mgr) |
205 | { | 210 | { |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 941787b..636cf31 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -583,43 +583,28 @@ bool idle_startup() | |||
583 | 583 | ||
584 | if (FALSE == gSavedSettings.getBOOL("NoAudio")) | 584 | if (FALSE == gSavedSettings.getBOOL("NoAudio")) |
585 | { | 585 | { |
586 | gAudiop = NULL; | 586 | |
587 | 587 | gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL(); | |
588 | #ifdef LL_FMOD | ||
589 | gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); | ||
590 | #endif | ||
591 | |||
592 | #ifdef LL_OPENAL | ||
593 | if (!gAudiop) | ||
594 | { | ||
595 | gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL(); | ||
596 | } | ||
597 | #endif | ||
598 | 588 | ||
599 | if (gAudiop) | 589 | if (gAudiop) |
600 | { | 590 | { |
601 | #if LL_WINDOWS | 591 | BOOL init = gAudiop->init(kAUDIO_NUM_SOURCES); |
602 | // FMOD on Windows needs the window handle to stop playing audio | 592 | if(!init) |
603 | // when window is minimized. JC | ||
604 | void* window_handle = (HWND)gViewerWindow->getPlatformWindow(); | ||
605 | #else | ||
606 | void* window_handle = NULL; | ||
607 | #endif | ||
608 | bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); | ||
609 | if(init) | ||
610 | { | 593 | { |
611 | gAudiop->setMuted(TRUE); | 594 | LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; |
595 | gAudiop=NULL; | ||
612 | } | 596 | } |
613 | else | 597 | else |
614 | { | 598 | { |
615 | LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; | 599 | gAudiop->setMuted(TRUE); |
616 | delete gAudiop; | 600 | LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL; |
617 | gAudiop = NULL; | ||
618 | } | 601 | } |
619 | } | 602 | } |
620 | } | 603 | } |
621 | 604 | else | |
622 | LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL; | 605 | { |
606 | gAudiop = NULL; | ||
607 | } | ||
623 | 608 | ||
624 | if (LLTimer::knownBadTimer()) | 609 | if (LLTimer::knownBadTimer()) |
625 | { | 610 | { |
@@ -766,6 +751,12 @@ bool idle_startup() | |||
766 | gLoginMenuBarView->setVisible( TRUE ); | 751 | gLoginMenuBarView->setVisible( TRUE ); |
767 | gLoginMenuBarView->setEnabled( TRUE ); | 752 | gLoginMenuBarView->setEnabled( TRUE ); |
768 | 753 | ||
754 | // DEV-16927. The following code removes errant keystrokes that happen while the window is being | ||
755 | // first made visible. | ||
756 | #ifdef _WIN32 | ||
757 | MSG msg; | ||
758 | while( PeekMessage( &msg, /*All hWnds owned by this thread */ NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) ); | ||
759 | #endif | ||
769 | timeout.reset(); | 760 | timeout.reset(); |
770 | return FALSE; | 761 | return FALSE; |
771 | } | 762 | } |