From e3bb365473de0bed48211e532aa632f2fac6a6b1 Mon Sep 17 00:00:00 2001 From: Konstantin Isakov Date: Sun, 8 Feb 2009 14:09:39 +0000 Subject: [PATCH] * Only use PlaySound for "gdau" links (Windows only) --- src/articleview.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/articleview.cc b/src/articleview.cc index 44a7320a..ba6288ee 100644 --- a/src/articleview.cc +++ b/src/articleview.cc @@ -179,25 +179,25 @@ void ArticleView::linkClicked( QUrl const & url ) // Decide the viewer - #ifdef Q_OS_WIN32 - // Windows-only: use system PlaySound function - - if ( winWavData.size() ) - PlaySoundA( 0, 0, 0 ); // Stop any currently playing sound to make sure - // previous data isn't used anymore - // - winWavData = data; - - PlaySoundA( &winWavData.front(), 0, - SND_ASYNC | SND_MEMORY | SND_NODEFAULT | SND_NOWAIT ); - - return; - #endif - QString program, extension; if ( url.scheme() == "gdau" ) { + #ifdef Q_OS_WIN32 + // Windows-only: use system PlaySound function + + if ( winWavData.size() ) + PlaySoundA( 0, 0, 0 ); // Stop any currently playing sound to make sure + // previous data isn't used anymore + // + winWavData = data; + + PlaySoundA( &winWavData.front(), 0, + SND_ASYNC | SND_MEMORY | SND_NODEFAULT | SND_NOWAIT ); + + return; + #endif + program = "mplayer"; extension = "wav"; }