Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plays only the first audio file in Qt Simulator #86

Open
GoogleCodeExporter opened this issue Mar 30, 2015 · 1 comment
Open

Plays only the first audio file in Qt Simulator #86

GoogleCodeExporter opened this issue Mar 30, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 10 Apr 2012 at 8:06

@GoogleCodeExporter
Copy link
Author

I'll have a look at it.

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

Original comment by [email protected] on 11 Apr 2012 at 7:22

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant