Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1400

QAudioInput::reset() API is not working as per the documentation from Multimedia module.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 1.1.x
    • 1.2.0
    • Multimedia
    • None
    • 3332f36fca5bc6c5f1cc4c6fed4c24ff7203687c

    Description

      STEPS LEADING TO PROBLEM:

      QAudioInput audioInput(testFormats.at(i), this);
      audioInput.setNotifyInterval(100);
      
      QSignalSpy stateSignal(&audioInput, SIGNAL(stateChanged(QAudio::State)));
      
      QVERIFY(stateSignal.count()== 0);
      QVERIFY(audioInput.bytesReady() == 0);
      QVERIFY(audioInput.state() == QAudio::StoppedState);
      
      audioInput.start();
      QTest::qWait(500);
      QVERIFY(stateSignal.count() == 1);
      QVERIFY(audioInput.bytesReady() > 0);
      QVERIFY(audioInput.state() == QAudio::IdleState);
      
      audioInput.reset();
      QTest::qWait(500);
      QVERIFY(stateSignal.count()== 1);
      QVERIFY(audioInput.bytesReady() == 0);
      QVERIFY(audioInput.state() == QAudio::IdleState);
      

      EXPECTED OUTCOME:
      reset() api should reset the state of audioInput and emit the stateChanged()
      signal.

      ACTUAL OUTCOME:
      reset() api is resetting the bytesReady to 0 , but the state is still same and
      stateChanged() signal not getting generated.

      Documentation says:
      reset() api drops all audio data in the buffers, resets buffers to zero.
      You can request a state change directly through suspend(), resume(), stop(),
      reset(), and start().

      Attachments

        Activity

          People

            ling.hu@nokia.com Ling Hu (closed Nokia identity) (Inactive)
            leonlee Leonard Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: