ryfx / monav

Automatically exported from code.google.com/p/monav
0 stars 0 forks source link

Plays only the first audio file in Qt Simulator #86

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In Qt Simulator, the current audio output code plays only the first instruction 
file (the beep), then no audio is played until restart of monav. I found that 
it goes into QAudio::IdleState after playing a file. But if you OR IdleState 
with StoppedState on maemo5, it stops working after a few instructions. The 
patch below works for these two build targets. I don't know about other 
targets. Maybe it must be different to work elsewhere.

diff -r 6c760c6d093f -r dffa80ee0e0c client/audio.cpp
--- a/client/audio.cpp  Sat Feb 25 12:03:56 2012 +0100
+++ b/client/audio.cpp  Thu Apr 05 21:48:33 2012 +0200
@@ -95,7 +95,11 @@
                return;
        }

+#ifdef Q_WS_MAEMO_5
        if ( m_audioOut->state() == QAudio::StoppedState ){
+#else
+       if ( (m_audioOut->state() == QAudio::StoppedState) || 
(m_audioOut->state() == QAudio::IdleState) ){
+#endif
                m_audioOut->start( &m_audioFile );
        }
        else if ( m_audioOut->state() == QAudio::SuspendedState ){

Original issue reported on code.google.com by robert.v...@gmx.de on 10 Apr 2012 at 8:06

GoogleCodeExporter commented 9 years ago
I'll have a look at it.

However, I can only test N900 and N9, anybody up for testing Android?

Original comment by veaac.fd...@gmail.com on 11 Apr 2012 at 7:22