diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-04-27 08:03:06 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-04-30 15:15:45 +0000 |
commit | 223af843b00f5a95200004538bb5da9286c5958d (patch) | |
tree | 61880244ad5173ccc7d4484f7c3390528886cc9b /examples | |
parent | 2f7721aeb8fc02d0551f9a7cb611000d528cd75f (diff) |
Move handling of QAudioInput/Output::processedUSecs() to the frontend
There's no need to handle this in platform specific code, when we might
as well handle it in platform independent code.
Change-Id: Ie0cdd49d41f0ecb5b784fc1564af71a106e41ad0
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimedia/spectrum/app/mainwidget.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/multimedia/spectrum/app/mainwidget.cpp b/examples/multimedia/spectrum/app/mainwidget.cpp index 20ce13a3d..9a6fa0ac5 100644 --- a/examples/multimedia/spectrum/app/mainwidget.cpp +++ b/examples/multimedia/spectrum/app/mainwidget.cpp @@ -117,8 +117,7 @@ void MainWidget::stateChanged(QAudio::Mode mode, QAudio::State state) updateButtonStates(); if (QAudio::ActiveState != state && - QAudio::SuspendedState != state && - QAudio::InterruptedState != state) { + QAudio::SuspendedState != state) { m_levelMeter->reset(); m_spectrograph->reset(); } @@ -423,8 +422,7 @@ void MainWidget::updateButtonStates() const bool playEnabled = (/*m_engine->dataLength() &&*/ (QAudio::AudioOutput != m_engine->mode() || (QAudio::ActiveState != m_engine->state() && - QAudio::IdleState != m_engine->state() && - QAudio::InterruptedState != m_engine->state()))); + QAudio::IdleState != m_engine->state()))); m_playButton->setEnabled(playEnabled); } |