summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/multimedia/audiooutput/audiooutput.cpp12
-rw-r--r--examples/multimedia/audiooutput/audiooutput.h4
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);
};