Make the multimedia examples less verbose
Important warnings such as missing services are still printed though. Task-number: QTBUG-31080 Change-Id: I96fd3837c4edc58c61b97bf950b7cab05ceed014 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
@@ -315,20 +315,11 @@ void InputTest::initializeAudio()
|
||||
void InputTest::createAudioInput()
|
||||
{
|
||||
m_audioInput = new QAudioInput(m_device, m_format, this);
|
||||
connect(m_audioInput, SIGNAL(notify()), SLOT(notified()));
|
||||
connect(m_audioInput, SIGNAL(stateChanged(QAudio::State)), SLOT(handleStateChanged(QAudio::State)));
|
||||
m_volumeSlider->setValue(m_audioInput->volume() * 100);
|
||||
m_audioInfo->start();
|
||||
m_audioInput->start(m_audioInfo);
|
||||
}
|
||||
|
||||
void InputTest::notified()
|
||||
{
|
||||
qWarning() << "bytesReady = " << m_audioInput->bytesReady()
|
||||
<< ", " << "elapsedUSecs = " <<m_audioInput->elapsedUSecs()
|
||||
<< ", " << "processedUSecs = "<<m_audioInput->processedUSecs();
|
||||
}
|
||||
|
||||
void InputTest::readMore()
|
||||
{
|
||||
if (!m_audioInput)
|
||||
@@ -364,27 +355,19 @@ void InputTest::toggleSuspend()
|
||||
{
|
||||
// toggle suspend/resume
|
||||
if (m_audioInput->state() == QAudio::SuspendedState) {
|
||||
qWarning() << "status: Suspended, resume()";
|
||||
m_audioInput->resume();
|
||||
m_suspendResumeButton->setText(tr(SUSPEND_LABEL));
|
||||
} else if (m_audioInput->state() == QAudio::ActiveState) {
|
||||
qWarning() << "status: Active, suspend()";
|
||||
m_audioInput->suspend();
|
||||
m_suspendResumeButton->setText(tr(RESUME_LABEL));
|
||||
} else if (m_audioInput->state() == QAudio::StoppedState) {
|
||||
qWarning() << "status: Stopped, resume()";
|
||||
m_audioInput->resume();
|
||||
m_suspendResumeButton->setText(tr(SUSPEND_LABEL));
|
||||
} else if (m_audioInput->state() == QAudio::IdleState) {
|
||||
qWarning() << "status: IdleState";
|
||||
// no-op
|
||||
}
|
||||
}
|
||||
|
||||
void InputTest::handleStateChanged(QAudio::State state)
|
||||
{
|
||||
qWarning() << "state = " << state;
|
||||
}
|
||||
|
||||
void InputTest::refreshDisplay()
|
||||
{
|
||||
m_canvas->setLevel(m_audioInfo->level());
|
||||
|
||||
Reference in New Issue
Block a user