diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-02-16 13:38:50 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-02-16 17:57:43 (GMT) |
commit | 0ce346691dbf620db04a99699194d490f324b1be (patch) | |
tree | 75de16035507bfe5e94b83aa8dd0b34a7cd33055 | |
parent | 658a559c918bd16b4e3f5af3e25242086a781220 (diff) | |
download | Qt-0ce346691dbf620db04a99699194d490f324b1be.zip Qt-0ce346691dbf620db04a99699194d490f324b1be.tar.gz Qt-0ce346691dbf620db04a99699194d490f324b1be.tar.bz2 |
Tidied up debug output in audio output example
Reviewed-by: trustme
-rw-r--r-- | examples/multimedia/audiooutput/audiooutput.cpp | 12 | ||||
-rw-r--r-- | examples/multimedia/audiooutput/audiooutput.h | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/examples/multimedia/audiooutput/audiooutput.cpp b/examples/multimedia/audiooutput/audiooutput.cpp index f60d7b6..04e1923 100644 --- a/examples/multimedia/audiooutput/audiooutput.cpp +++ b/examples/multimedia/audiooutput/audiooutput.cpp @@ -213,7 +213,7 @@ void AudioTest::initializeAudio() QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice()); if (!info.isFormatSupported(m_format)) { - qWarning()<<"default format not supported try to use nearest"; + qWarning() << "Default format not supported - trying to use nearest"; m_format = info.nearestFormat(m_format); } @@ -238,19 +238,21 @@ AudioTest::~AudioTest() } -void AudioTest::deviceChanged(int idx) +void AudioTest::deviceChanged(int index) { m_timer->stop(); m_generator->stop(); m_audioOutput->stop(); m_audioOutput->disconnect(this); - m_device = m_deviceBox->itemData(idx).value<QAudioDeviceInfo>(); + m_device = m_deviceBox->itemData(index).value<QAudioDeviceInfo>(); createAudioOutput(); } void AudioTest::status() { - qWarning() << "byteFree = " << m_audioOutput->bytesFree() << " bytes, elapsedUSecs = " << m_audioOutput->elapsedUSecs() << ", processedUSecs = " << m_audioOutput->processedUSecs(); + qWarning() << "bytesFree = " << m_audioOutput->bytesFree() + << ", " << "elapsedUSecs = " << m_audioOutput->elapsedUSecs() + << ", " << "processedUSecs = " << m_audioOutput->processedUSecs(); } void AudioTest::writeMore() @@ -318,5 +320,5 @@ void AudioTest::togglePlay() void AudioTest::state(QAudio::State state) { - qWarning() << " state=" << state; + qWarning() << "state = " << state; } diff --git a/examples/multimedia/audiooutput/audiooutput.h b/examples/multimedia/audiooutput/audiooutput.h index ea47e8b..1880d8d 100644 --- a/examples/multimedia/audiooutput/audiooutput.h +++ b/examples/multimedia/audiooutput/audiooutput.h @@ -112,7 +112,7 @@ private slots: void writeMore(); void toggle(); void togglePlay(); - void state(QAudio::State s); - void deviceChanged(int idx); + void state(QAudio::State state); + void deviceChanged(int index); }; |