summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/audiodevices/audiodevices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/audiodevices/audiodevices.cpp')
-rw-r--r--examples/multimedia/audiodevices/audiodevices.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/multimedia/audiodevices/audiodevices.cpp b/examples/multimedia/audiodevices/audiodevices.cpp
index 4f4a95f..beb31b4 100644
--- a/examples/multimedia/audiodevices/audiodevices.cpp
+++ b/examples/multimedia/audiodevices/audiodevices.cpp
@@ -108,8 +108,8 @@ void AudioTest::test()
} else {
QAudioFormat nearest = deviceInfo.nearestFormat(settings);
logOutput->append(tr("Failed"));
- nearestFreq->setText(QString("%1").arg(nearest.frequency()));
- nearestChannel->setText(QString("%1").arg(nearest.channels()));
+ nearestFreq->setText(QString("%1").arg(nearest.sampleRate()));
+ nearestChannel->setText(QString("%1").arg(nearest.channelCount()));
nearestCodec->setText(nearest.codec());
nearestSampleSize->setText(QString("%1").arg(nearest.sampleSize()));
@@ -161,14 +161,14 @@ void AudioTest::deviceChanged(int idx)
deviceInfo = deviceBox->itemData(idx).value<QAudioDeviceInfo>();
frequencyBox->clear();
- QList<int> freqz = deviceInfo.supportedFrequencies();
+ QList<int> freqz = deviceInfo.supportedSampleRates();
for(int i = 0; i < freqz.size(); ++i)
frequencyBox->addItem(QString("%1").arg(freqz.at(i)));
if(freqz.size())
- settings.setFrequency(freqz.at(0));
+ settings.setSampleRate(freqz.at(0));
channelsBox->clear();
- QList<int> chz = deviceInfo.supportedChannels();
+ QList<int> chz = deviceInfo.supportedChannelCounts();
for(int i = 0; i < chz.size(); ++i)
channelsBox->addItem(QString("%1").arg(chz.at(i)));
if(chz.size())
@@ -229,7 +229,7 @@ void AudioTest::deviceChanged(int idx)
void AudioTest::freqChanged(int idx)
{
// freq has changed
- settings.setFrequency(frequencyBox->itemText(idx).toInt());
+ settings.setSampleRate(frequencyBox->itemText(idx).toInt());
}
void AudioTest::channelChanged(int idx)