From 6c5454b0f8bc75f32af6ceaa7a5730413e9812f9 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 14 Jan 2010 11:37:47 +1000 Subject: Revert "Added setChannelCount() to QAudioFormat." This reverts commit f124538ef4840c3d24b4c7e9e7221adb52bdee2c. Conflicts: examples/multimedia/audioinput/audioinput.cpp examples/multimedia/audiooutput/audiooutput.cpp src/multimedia/audio/qaudio_mac.cpp src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp src/multimedia/audio/qaudioformat.h src/multimedia/audio/qaudioinput.cpp src/multimedia/audio/qaudiooutput.cpp tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp tests/auto/qaudioformat/tst_qaudioformat.cpp tests/auto/qaudioinput/tst_qaudioinput.cpp tests/auto/qaudiooutput/tst_qaudiooutput.cpp --- doc/src/snippets/audio/main.cpp | 2 +- examples/multimedia/audiodevices/audiodevices.cpp | 4 ++-- examples/multimedia/audioinput/audioinput.cpp | 4 ++-- examples/multimedia/audiooutput/audiooutput.cpp | 4 ++-- src/multimedia/audio/qaudio_mac.cpp | 4 ++-- src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp | 10 +++++----- src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp | 8 ++++---- src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp | 8 ++++---- src/multimedia/audio/qaudioformat.cpp | 9 --------- src/multimedia/audio/qaudioformat.h | 6 ------ src/multimedia/audio/qaudioinput.cpp | 4 ++-- src/multimedia/audio/qaudiooutput.cpp | 4 ++-- tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp | 4 ++-- tests/auto/qaudioformat/tst_qaudioformat.cpp | 20 ++++++++++---------- tests/auto/qaudioinput/tst_qaudioinput.cpp | 4 ++-- tests/auto/qaudiooutput/tst_qaudiooutput.cpp | 4 ++-- 16 files changed, 42 insertions(+), 57 deletions(-) diff --git a/doc/src/snippets/audio/main.cpp b/doc/src/snippets/audio/main.cpp index f000075..6b7a6a5 100644 --- a/doc/src/snippets/audio/main.cpp +++ b/doc/src/snippets/audio/main.cpp @@ -91,7 +91,7 @@ private: QAudioFormat format; format.setSampleRate(44100); //![1] - format.setChannelCount(2); + format.setChannels(2); format.setSampleSize(16); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); diff --git a/examples/multimedia/audiodevices/audiodevices.cpp b/examples/multimedia/audiodevices/audiodevices.cpp index 6373d57..b0d472c 100644 --- a/examples/multimedia/audiodevices/audiodevices.cpp +++ b/examples/multimedia/audiodevices/audiodevices.cpp @@ -160,7 +160,7 @@ void AudioTest::deviceChanged(int idx) for(int i = 0; i < chz.size(); ++i) channelsBox->addItem(QString("%1").arg(chz.at(i))); if(chz.size()) - settings.setChannelCount(chz.at(0)); + settings.setChannels(chz.at(0)); codecsBox->clear(); QStringList codecz = deviceInfo.supportedCodecs(); @@ -222,7 +222,7 @@ void AudioTest::freqChanged(int idx) void AudioTest::channelChanged(int idx) { - settings.setChannelCount(channelsBox->itemText(idx).toInt()); + settings.setChannels(channelsBox->itemText(idx).toInt()); } void AudioTest::codecChanged(int idx) diff --git a/examples/multimedia/audioinput/audioinput.cpp b/examples/multimedia/audioinput/audioinput.cpp index 86650da..8cc9948 100644 --- a/examples/multimedia/audioinput/audioinput.cpp +++ b/examples/multimedia/audioinput/audioinput.cpp @@ -198,8 +198,8 @@ InputTest::InputTest() pullMode = true; - format.setSampleRate(8000); - format.setChannelCount(1); + format.setFrequency(8000); + format.setChannels(1); format.setSampleSize(16); format.setSampleType(QAudioFormat::SignedInt); format.setByteOrder(QAudioFormat::LittleEndian); diff --git a/examples/multimedia/audiooutput/audiooutput.cpp b/examples/multimedia/audiooutput/audiooutput.cpp index 58dbbaf..0c57f4d 100644 --- a/examples/multimedia/audiooutput/audiooutput.cpp +++ b/examples/multimedia/audiooutput/audiooutput.cpp @@ -164,8 +164,8 @@ AudioTest::AudioTest() gen->start(); - settings.setSampleRate(SYSTEM_FREQ); - settings.setChannelCount(1); + settings.setFrequency(SYSTEM_FREQ); + settings.setChannels(1); settings.setSampleSize(16); settings.setCodec("audio/pcm"); settings.setByteOrder(QAudioFormat::LittleEndian); diff --git a/src/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp index 61a00ce..f6c4c02 100644 --- a/src/multimedia/audio/qaudio_mac.cpp +++ b/src/multimedia/audio/qaudio_mac.cpp @@ -64,8 +64,8 @@ QAudioFormat toQAudioFormat(AudioStreamBasicDescription const& sf) { QAudioFormat audioFormat; - audioFormat.setSampleRate(sf.mSampleRate); - audioFormat.setChannelCount(sf.mChannelsPerFrame); + audioFormat.setFrequency(sf.mSampleRate); + audioFormat.setChannels(sf.mChannelsPerFrame); audioFormat.setSampleSize(sf.mBitsPerChannel); audioFormat.setCodec(QString::fromLatin1("audio/pcm")); audioFormat.setByteOrder(sf.mFormatFlags & kLinearPCMFormatFlagIsBigEndian != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian); diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index a77a428..ee1b775 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -78,20 +78,20 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const { QAudioFormat nearest; if(mode == QAudio::AudioOutput) { - nearest.setSampleRate(44100); - nearest.setChannelCount(2); + nearest.setFrequency(44100); + nearest.setChannels(2); nearest.setByteOrder(QAudioFormat::LittleEndian); nearest.setSampleType(QAudioFormat::SignedInt); nearest.setSampleSize(16); nearest.setCodec(QLatin1String("audio/pcm")); } else { - nearest.setSampleRate(8000); - nearest.setChannelCount(1); + nearest.setFrequency(8000); + nearest.setChannels(1); nearest.setSampleType(QAudioFormat::UnSignedInt); nearest.setSampleSize(8); nearest.setCodec(QLatin1String("audio/pcm")); if(!testSettings(nearest)) { - nearest.setChannelCount(2); + nearest.setChannels(2); nearest.setSampleSize(16); nearest.setSampleType(QAudioFormat::SignedInt); } diff --git a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp index 9334069..ecd03e5 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp @@ -144,10 +144,10 @@ QAudioFormat QAudioDeviceInfoInternal::nearestFormat(const QAudioFormat& format) rc.setCodec(QString::fromLatin1("audio/pcm")); - if (rc.sampleRate() != target.sampleRate()) - rc.setSampleRate(target.sampleRate()); - if (rc.channelCount() != target.channelCount()) - rc.setChannelCount(target.channelCount()); + if (rc.frequency() != target.frequency()) + rc.setFrequency(target.frequency()); + if (rc.channels() != target.channels()) + rc.setChannels(target.channels()); if (rc.sampleSize() != target.sampleSize()) rc.setSampleSize(target.sampleSize()); if (rc.byteOrder() != target.byteOrder()) diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp index 373e23d..f2423f8 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp @@ -94,15 +94,15 @@ QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const { QAudioFormat nearest; if(mode == QAudio::AudioOutput) { - nearest.setSampleRate(44100); - nearest.setChannelCount(2); + nearest.setFrequency(44100); + nearest.setChannels(2); nearest.setByteOrder(QAudioFormat::LittleEndian); nearest.setSampleType(QAudioFormat::SignedInt); nearest.setSampleSize(16); nearest.setCodec(QLatin1String("audio/pcm")); } else { - nearest.setSampleRate(11025); - nearest.setChannelCount(1); + nearest.setFrequency(11025); + nearest.setChannels(1); nearest.setByteOrder(QAudioFormat::LittleEndian); nearest.setSampleType(QAudioFormat::SignedInt); nearest.setSampleSize(8); diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp index 58bb571..3b06b9a 100644 --- a/src/multimedia/audio/qaudioformat.cpp +++ b/src/multimedia/audio/qaudioformat.cpp @@ -263,15 +263,6 @@ int QAudioFormat::frequency() const Sets the channel count to \a channels. */ -void QAudioFormat::setChannelCount(int channels) -{ - d->channels = channels; -} - -/*! - \internal -*/ - void QAudioFormat::setChannels(int channels) { d->channels = channels; diff --git a/src/multimedia/audio/qaudioformat.h b/src/multimedia/audio/qaudioformat.h index b255907..cb58d1c 100644 --- a/src/multimedia/audio/qaudioformat.h +++ b/src/multimedia/audio/qaudioformat.h @@ -76,12 +76,6 @@ public: void setFrequency(int frequency); int frequency() const; - void setSampleRate(int samplerate); - int sampleRate() const; - - void setChannelCount(int channels); - int channelCount() const; - void setChannels(int channels); int channels() const; diff --git a/src/multimedia/audio/qaudioinput.cpp b/src/multimedia/audio/qaudioinput.cpp index da39c4a..45cafc1 100644 --- a/src/multimedia/audio/qaudioinput.cpp +++ b/src/multimedia/audio/qaudioinput.cpp @@ -88,8 +88,8 @@ QT_BEGIN_NAMESPACE QAudioFormat format; // set up the format you want, eg. - format.setSampleRate(8000); - format.setChannelCount(1); + format.setFrequency(8000); + format.setChannels(1); format.setSampleSize(8); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); diff --git a/src/multimedia/audio/qaudiooutput.cpp b/src/multimedia/audio/qaudiooutput.cpp index b61aa4f..afd8a84 100644 --- a/src/multimedia/audio/qaudiooutput.cpp +++ b/src/multimedia/audio/qaudiooutput.cpp @@ -83,8 +83,8 @@ QT_BEGIN_NAMESPACE QAudioFormat format; // Set up the format, eg. - format.setSampleRate(8000); - format.setChannelCount(1); + format.setFrequency(8000); + format.setChannels(1); format.setSampleSize(8); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp index e332e11..0c91d5c 100644 --- a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp +++ b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp @@ -169,8 +169,8 @@ void tst_QAudioDeviceInfo::isformat() { if(available) { QAudioFormat format; - format.setSampleRate(44100); - format.setChannelCount(2); + format.setFrequency(44100); + format.setChannels(2); format.setSampleType(QAudioFormat::SignedInt); format.setByteOrder(QAudioFormat::LittleEndian); format.setSampleSize(16); diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp index a7200c4..1d3f313 100644 --- a/tests/auto/qaudioformat/tst_qaudioformat.cpp +++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp @@ -77,8 +77,8 @@ void tst_QAudioFormat::checkNull() QAudioFormat audioFormat1(audioFormat0); QVERIFY(!audioFormat1.isValid()); - audioFormat0.setSampleRate(44100); - audioFormat0.setChannelCount(2); + audioFormat0.setFrequency(44100); + audioFormat0.setChannels(2); audioFormat0.setSampleSize(16); audioFormat0.setCodec("audio/pcm"); audioFormat0.setSampleType(QAudioFormat::SignedInt); @@ -95,8 +95,8 @@ void tst_QAudioFormat::checkFrequency() void tst_QAudioFormat::checkChannels() { QAudioFormat audioFormat; - audioFormat.setChannelCount(2); - QVERIFY(audioFormat.channelCount() == 2); + audioFormat.setChannels(2); + QVERIFY(audioFormat.channels() == 2); } void tst_QAudioFormat::checkSampleSize() @@ -137,15 +137,15 @@ void tst_QAudioFormat::checkEquality() QVERIFY(!(audioFormat0 != audioFormat1)); // on filled formats - audioFormat0.setSampleRate(8000); - audioFormat0.setChannelCount(1); + audioFormat0.setFrequency(8000); + audioFormat0.setChannels(1); audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); audioFormat0.setSampleType(QAudioFormat::UnSignedInt); - audioFormat1.setSampleRate(8000); - audioFormat1.setChannelCount(1); + audioFormat1.setFrequency(8000); + audioFormat1.setChannels(1); audioFormat1.setSampleSize(8); audioFormat1.setCodec("audio/pcm"); audioFormat1.setByteOrder(QAudioFormat::LittleEndian); @@ -164,8 +164,8 @@ void tst_QAudioFormat::checkAssignment() QAudioFormat audioFormat0; QAudioFormat audioFormat1; - audioFormat0.setSampleRate(8000); - audioFormat0.setChannelCount(1); + audioFormat0.setFrequency(8000); + audioFormat0.setChannels(1); audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp index 9468413..d17a12a 100644 --- a/tests/auto/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp @@ -68,8 +68,8 @@ private: void tst_QAudioInput::initTestCase() { - format.setSampleRate(8000); - format.setChannelCount(1); + format.setFrequency(8000); + format.setChannels(1); format.setSampleSize(8); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp index 5005838..e1b73da 100644 --- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp +++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp @@ -71,8 +71,8 @@ private: void tst_QAudioOutput::initTestCase() { - format.setSampleRate(8000); - format.setChannelCount(1); + format.setFrequency(8000); + format.setChannels(1); format.setSampleSize(8); format.setCodec("audio/pcm"); format.setByteOrder(QAudioFormat::LittleEndian); -- cgit v0.12 From e2f1ae626840d3f7c13fb5e071506d545688a9ab Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 14 Jan 2010 11:58:01 +1000 Subject: Revert "Frequency to SampleRate and channels to channelCount." This reverts commit 80d4a4945d3273a4b2ce91e34597533f661af320. Conflicts: examples/multimedia/audioinput/audioinput.cpp examples/multimedia/audiooutput/audiooutput.cpp src/multimedia/audio/qaudio_mac.cpp src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp src/multimedia/audio/qaudiodeviceinfo_mac_p.cpp src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp src/multimedia/audio/qaudioformat.h src/multimedia/audio/qaudioinput.cpp src/multimedia/audio/qaudiooutput.cpp tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp tests/auto/qaudioformat/tst_qaudioformat.cpp tests/auto/qaudioinput/tst_qaudioinput.cpp tests/auto/qaudiooutput/tst_qaudiooutput.cpp --- doc/src/snippets/audio/main.cpp | 2 +- examples/multimedia/audiodevices/audiodevices.cpp | 12 +++---- src/multimedia/audio/qaudio_mac.cpp | 8 ++--- src/multimedia/audio/qaudiodeviceinfo.cpp | 26 +++------------ src/multimedia/audio/qaudiodeviceinfo.h | 2 -- src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp | 16 +++++----- src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp | 6 ++-- src/multimedia/audio/qaudioformat.cpp | 37 +++------------------- src/multimedia/audio/qaudioinput_alsa_p.cpp | 8 ++--- src/multimedia/audio/qaudioinput_mac_p.cpp | 2 +- src/multimedia/audio/qaudioinput_win32_p.cpp | 14 ++++---- src/multimedia/audio/qaudiooutput_alsa_p.cpp | 6 ++-- src/multimedia/audio/qaudiooutput_mac_p.cpp | 6 ++-- src/multimedia/audio/qaudiooutput_win32_p.cpp | 14 ++++---- .../auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp | 12 +++---- tests/auto/qaudioformat/tst_qaudioformat.cpp | 26 +++++++++++++-- tests/auto/qaudioinput/tst_qaudioinput.cpp | 4 +-- tests/auto/qaudiooutput/tst_qaudiooutput.cpp | 4 +-- 18 files changed, 89 insertions(+), 116 deletions(-) diff --git a/doc/src/snippets/audio/main.cpp b/doc/src/snippets/audio/main.cpp index 6b7a6a5..019f208 100644 --- a/doc/src/snippets/audio/main.cpp +++ b/doc/src/snippets/audio/main.cpp @@ -89,7 +89,7 @@ private: { //![1] QAudioFormat format; - format.setSampleRate(44100); + format.setFrequency(44100); //![1] format.setChannels(2); format.setSampleSize(16); diff --git a/examples/multimedia/audiodevices/audiodevices.cpp b/examples/multimedia/audiodevices/audiodevices.cpp index b0d472c..7d09c38 100644 --- a/examples/multimedia/audiodevices/audiodevices.cpp +++ b/examples/multimedia/audiodevices/audiodevices.cpp @@ -96,8 +96,8 @@ void AudioTest::test() } else { QAudioFormat nearest = deviceInfo.nearestFormat(settings); logOutput->append(tr("Failed")); - nearestFreq->setText(QString("%1").arg(nearest.sampleRate())); - nearestChannel->setText(QString("%1").arg(nearest.channelCount())); + nearestFreq->setText(QString("%1").arg(nearest.frequency())); + nearestChannel->setText(QString("%1").arg(nearest.channels())); nearestCodec->setText(nearest.codec()); nearestSampleSize->setText(QString("%1").arg(nearest.sampleSize())); @@ -149,14 +149,14 @@ void AudioTest::deviceChanged(int idx) deviceInfo = deviceBox->itemData(idx).value(); frequencyBox->clear(); - QList freqz = deviceInfo.supportedSampleRates(); + QList freqz = deviceInfo.supportedFrequencies(); for(int i = 0; i < freqz.size(); ++i) frequencyBox->addItem(QString("%1").arg(freqz.at(i))); if(freqz.size()) - settings.setSampleRate(freqz.at(0)); + settings.setFrequency(freqz.at(0)); channelsBox->clear(); - QList chz = deviceInfo.supportedChannelCounts(); + QList chz = deviceInfo.supportedChannels(); for(int i = 0; i < chz.size(); ++i) channelsBox->addItem(QString("%1").arg(chz.at(i))); if(chz.size()) @@ -217,7 +217,7 @@ void AudioTest::deviceChanged(int idx) void AudioTest::freqChanged(int idx) { // freq has changed - settings.setSampleRate(frequencyBox->itemText(idx).toInt()); + settings.setFrequency(frequencyBox->itemText(idx).toInt()); } void AudioTest::channelChanged(int idx) diff --git a/src/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp index f6c4c02..14fee8b 100644 --- a/src/multimedia/audio/qaudio_mac.cpp +++ b/src/multimedia/audio/qaudio_mac.cpp @@ -48,8 +48,8 @@ QT_BEGIN_NAMESPACE QDebug operator<<(QDebug dbg, const QAudioFormat& audioFormat) { dbg.nospace() << "QAudioFormat(" << - audioFormat.sampleRate() << "," << - audioFormat.channelCount() << "," << + audioFormat.frequency() << "," << + audioFormat.channels() << "," << audioFormat.sampleSize()<< "," << audioFormat.codec() << "," << audioFormat.byteOrder() << "," << @@ -84,9 +84,9 @@ AudioStreamBasicDescription toAudioStreamBasicDescription(QAudioFormat const& au AudioStreamBasicDescription sf; sf.mFormatFlags = kAudioFormatFlagIsPacked; - sf.mSampleRate = audioFormat.sampleRate(); + sf.mSampleRate = audioFormat.frequency(); sf.mFramesPerPacket = 1; - sf.mChannelsPerFrame = audioFormat.channelCount(); + sf.mChannelsPerFrame = audioFormat.channels(); sf.mBitsPerChannel = audioFormat.sampleSize(); sf.mBytesPerFrame = sf.mChannelsPerFrame * (sf.mBitsPerChannel / 8); sf.mBytesPerPacket = sf.mFramesPerPacket * sf.mBytesPerFrame; diff --git a/src/multimedia/audio/qaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo.cpp index ca20eda..092efc5 100644 --- a/src/multimedia/audio/qaudiodeviceinfo.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo.cpp @@ -100,13 +100,13 @@ public: You can also query each device for the formats it supports. A format in this context is a set consisting of a specific byte - order, channel, codec, sample rate, sample size and sample type. A + order, channel, codec, frequency, sample rate, and sample type. A format is represented by the QAudioFormat class. The values supported by the the device for each of these parameters can be fetched with supportedByteOrders(), supportedChannels(), supportedCodecs(), - supportedSampleRates(), supportedSampleSizes(), and + supportedFrequencies(), supportedSampleSizes(), and supportedSampleTypes(). The combinations supported are dependent on the platform, audio plugins installed and the audio device capabilities. If you need a specific format, you can check if the device supports it with isFormatSupported(), or fetch a @@ -259,16 +259,7 @@ QStringList QAudioDeviceInfo::supportedCodecs() const } /*! - Returns a list of supported sample rates. -*/ - -QList QAudioDeviceInfo::supportedSampleRates() const -{ - return supportedFrequencies(); -} - -/*! - \internal + Returns a list of supported frequencies. */ QList QAudioDeviceInfo::supportedFrequencies() const @@ -277,16 +268,7 @@ QList QAudioDeviceInfo::supportedFrequencies() const } /*! - Returns a list of supported channel counts. -*/ - -QList QAudioDeviceInfo::supportedChannelCounts() const -{ - return supportedChannels(); -} - -/*! - \internal + Returns a list of supported channels. */ QList QAudioDeviceInfo::supportedChannels() const diff --git a/src/multimedia/audio/qaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo.h index 1cc0731..62dc8a2 100644 --- a/src/multimedia/audio/qaudiodeviceinfo.h +++ b/src/multimedia/audio/qaudiodeviceinfo.h @@ -84,9 +84,7 @@ public: QStringList supportedCodecs() const; QList supportedFrequencies() const; - QList supportedSampleRates() const; QList supportedChannels() const; - QList supportedChannelCounts() const; QList supportedSampleSizes() const; QList supportedByteOrders() const; QList supportedSampleTypes() const; diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp index ee1b775..36270a7 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp @@ -253,8 +253,8 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const snd_pcm_hw_params_any( handle, params ); // set the values! - snd_pcm_hw_params_set_channels(handle,params,format.channelCount()); - snd_pcm_hw_params_set_rate(handle,params,format.sampleRate(),dir); + snd_pcm_hw_params_set_channels(handle,params,format.channels()); + snd_pcm_hw_params_set_rate(handle,params,format.frequency(),dir); switch(format.sampleSize()) { case 8: if(format.sampleType() == QAudioFormat::SignedInt) @@ -295,18 +295,18 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const } else testCodec = true; - if(err>=0 && format.channelCount() != -1) { - err = snd_pcm_hw_params_test_channels(handle,params,format.channelCount()); + if(err>=0 && format.channels() != -1) { + err = snd_pcm_hw_params_test_channels(handle,params,format.channels()); if(err>=0) - err = snd_pcm_hw_params_set_channels(handle,params,format.channelCount()); + err = snd_pcm_hw_params_set_channels(handle,params,format.channels()); if(err>=0) testChannel = true; } - if(err>=0 && format.sampleRate() != -1) { - err = snd_pcm_hw_params_test_rate(handle,params,format.sampleRate(),0); + if(err>=0 && format.frequency() != -1) { + err = snd_pcm_hw_params_test_rate(handle,params,format.frequency(),0); if(err>=0) - err = snd_pcm_hw_params_set_rate(handle,params,format.sampleRate(),dir); + err = snd_pcm_hw_params_set_rate(handle,params,format.frequency(),dir); if(err>=0) testFreq = true; } diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp index f2423f8..f6b8154 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp @@ -181,12 +181,12 @@ bool QAudioDeviceInfoInternal::testSettings(const QAudioFormat& format) const if(!format.codec().startsWith(QLatin1String("audio/pcm"))) failed = true; - if(!failed && !(format.channelCount() == 1 || format.channelCount() == 2)) + if(!failed && !(format.channels() == 1 || format.channels() == 2)) failed = true; if(!failed) { - if(!(format.sampleRate() == 8000 || format.sampleRate() == 11025 || format.sampleRate() == 22050 || - format.sampleRate() == 44100 || format.sampleRate() == 48000 || format.sampleRate() == 96000)) + if(!(format.frequency() == 8000 || format.frequency() == 11025 || format.frequency() == 22050 || + format.frequency() == 44100 || format.frequency() == 48000 || format.frequency() == 96000)) failed = true; } diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp index 3b06b9a..89ae0ff 100644 --- a/src/multimedia/audio/qaudioformat.cpp +++ b/src/multimedia/audio/qaudioformat.cpp @@ -144,7 +144,7 @@ public: Values are initialized as follows: \list \o frequency() = -1 - \o channelCount() = -1 + \o channels() = -1 \o sampleSize() = -1 \o byteOrder() = QAudioFormat::Endian(QSysInfo::ByteOrder) \o sampleType() = QAudioFormat::Unknown @@ -224,16 +224,7 @@ bool QAudioFormat::isValid() const } /*! - Sets the sample rate to \a samplerate Hertz. -*/ - -void QAudioFormat::setSampleRate(int samplerate) -{ - d->frequency = samplerate; -} - -/*! - \internal + Sets the frequency to \a frequency. */ void QAudioFormat::setFrequency(int frequency) @@ -242,16 +233,7 @@ void QAudioFormat::setFrequency(int frequency) } /*! - Returns the current sample rate in Hertz. -*/ - -int QAudioFormat::sampleRate() const -{ - return d->frequency; -} - -/*! - \internal + Returns the current frequency value. */ int QAudioFormat::frequency() const @@ -260,7 +242,7 @@ int QAudioFormat::frequency() const } /*! - Sets the channel count to \a channels. + Sets the channels to \a channels. */ void QAudioFormat::setChannels(int channels) @@ -269,16 +251,7 @@ void QAudioFormat::setChannels(int channels) } /*! - Returns the current channel count value. -*/ - -int QAudioFormat::channelCount() const -{ - return d->channels; -} - -/*! - \internal + Returns the current channel value. */ int QAudioFormat::channels() const diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp index ea68c8d6..26e46b3 100644 --- a/src/multimedia/audio/qaudioinput_alsa_p.cpp +++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp @@ -256,7 +256,7 @@ bool QAudioInputPrivate::open() int dir; int err=-1; int count=0; - unsigned int freakuency=settings.sampleRate(); + unsigned int freakuency=settings.frequency(); QString dev = QString(QLatin1String(m_device.constData())); QList devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioInput); @@ -332,7 +332,7 @@ bool QAudioInputPrivate::open() } } if ( !fatal ) { - err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channelCount() ); + err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channels() ); if ( err < 0 ) { fatal = true; errMessage = QString::fromLatin1("QAudioInput: snd_pcm_hw_params_set_channels: err = %1").arg(err); @@ -505,7 +505,7 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len) errorState = QAudio::NoError; deviceState = QAudio::IdleState; } else { - totalTimeValue += snd_pcm_bytes_to_frames(handle, err)*1000000/settings.sampleRate(); + totalTimeValue += snd_pcm_bytes_to_frames(handle, err)*1000000/settings.frequency(); resuming = false; errorState = QAudio::NoError; deviceState = QAudio::ActiveState; @@ -702,7 +702,7 @@ qint64 InputPrivate::readData( char* data, qint64 len) count++; } if(err > 0 && readFrames > 0) { - audioDevice->totalTimeValue += readFrames*1000/audioDevice->settings.sampleRate()*1000; + audioDevice->totalTimeValue += readFrames*1000/audioDevice->settings.frequency()*1000; audioDevice->deviceState = QAudio::ActiveState; return err; } diff --git a/src/multimedia/audio/qaudioinput_mac_p.cpp b/src/multimedia/audio/qaudioinput_mac_p.cpp index f5be8ee..7251513 100644 --- a/src/multimedia/audio/qaudioinput_mac_p.cpp +++ b/src/multimedia/audio/qaudioinput_mac_p.cpp @@ -814,7 +814,7 @@ int QAudioInputPrivate::notifyInterval() const qint64 QAudioInputPrivate::processedUSecs() const { - return totalFrames * 1000000 / audioFormat.sampleRate(); + return totalFrames * 1000000 / audioFormat.frequency(); } qint64 QAudioInputPrivate::elapsedUSecs() const diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp index 5c597ef..17e8bfb 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.cpp +++ b/src/multimedia/audio/qaudioinput_win32_p.cpp @@ -225,16 +225,16 @@ bool QAudioInputPrivate::open() header = 0; if(buffer_size == 0) { // Default buffer size, 100ms, default period size is 20ms - buffer_size = settings.sampleRate()*settings.channelCount()*(settings.sampleSize()/8)*0.1; + buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.1; period_size = buffer_size/5; } else { period_size = buffer_size/5; } timeStamp.restart(); elapsedTimeOffset = 0; - wfx.nSamplesPerSec = settings.sampleRate(); + wfx.nSamplesPerSec = settings.frequency(); wfx.wBitsPerSample = settings.sampleSize(); - wfx.nChannels = settings.channelCount(); + wfx.nChannels = settings.channels(); wfx.cbSize = 0; wfx.wFormatTag = WAVE_FORMAT_PCM; @@ -374,8 +374,8 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len) } else { totalTimeValue += waveBlocks[header].dwBytesRecorded - /((settings.channelCount()*settings.sampleSize()/8)) - *10000/settings.sampleRate()*100; + /((settings.channels()*settings.sampleSize()/8)) + *10000/settings.frequency()*100; errorState = QAudio::NoError; deviceState = QAudio::ActiveState; resuming = false; @@ -388,8 +388,8 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len) qDebug()<<"IN: "< devices = QAudioDeviceInfoInternal::availableDevices(QAudio::AudioOutput); @@ -354,7 +354,7 @@ bool QAudioOutputPrivate::open() } } if ( !fatal ) { - err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channelCount() ); + err = snd_pcm_hw_params_set_channels( handle, hwparams, (unsigned int)settings.channels() ); if ( err < 0 ) { fatal = true; errMessage = QString::fromLatin1("QAudioOutput: snd_pcm_hw_params_set_channels: err = %1").arg(err); @@ -494,7 +494,7 @@ qint64 QAudioOutputPrivate::write( const char *data, qint64 len ) err = snd_pcm_writei( handle, data, frames ); } if(err > 0) { - totalTimeValue += err*1000000/settings.sampleRate(); + totalTimeValue += err*1000000/settings.frequency(); resuming = false; errorState = QAudio::NoError; deviceState = QAudio::ActiveState; diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp index 4367ee7..518f78f 100644 --- a/src/multimedia/audio/qaudiooutput_mac_p.cpp +++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp @@ -87,8 +87,8 @@ public: m_device(0) { m_buffer = new QAudioRingBuffer(bufferSize + (bufferSize % maxPeriodSize == 0 ? 0 : maxPeriodSize - (bufferSize % maxPeriodSize))); - m_bytesPerFrame = (audioFormat.sampleSize() / 8) * audioFormat.channelCount(); - m_periodTime = m_maxPeriodSize / m_bytesPerFrame * 1000 / audioFormat.sampleRate(); + m_bytesPerFrame = (audioFormat.sampleSize() / 8) * audioFormat.channels(); + m_periodTime = m_maxPeriodSize / m_bytesPerFrame * 1000 / audioFormat.frequency(); m_fillTimer = new QTimer(this); connect(m_fillTimer, SIGNAL(timeout()), SLOT(fillBuffer())); @@ -546,7 +546,7 @@ int QAudioOutputPrivate::notifyInterval() const qint64 QAudioOutputPrivate::processedUSecs() const { - return totalFrames * 1000000 / audioFormat.sampleRate(); + return totalFrames * 1000000 / audioFormat.frequency(); } qint64 QAudioOutputPrivate::elapsedUSecs() const diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp index b6e9762..c31e048 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.cpp +++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp @@ -213,7 +213,7 @@ bool QAudioOutputPrivate::open() #endif if(buffer_size == 0) { // Default buffer size, 200ms, default period size is 40ms - buffer_size = settings.sampleRate()*settings.channelCount()*(settings.sampleSize()/8)*0.2; + buffer_size = settings.frequency()*settings.channels()*(settings.sampleSize()/8)*0.2; period_size = buffer_size/5; } else { period_size = buffer_size/5; @@ -232,9 +232,9 @@ bool QAudioOutputPrivate::open() timeStamp.restart(); elapsedTimeOffset = 0; - wfx.nSamplesPerSec = settings.sampleRate(); + wfx.nSamplesPerSec = settings.frequency(); wfx.wBitsPerSample = settings.sampleSize(); - wfx.nChannels = settings.channelCount(); + wfx.nChannels = settings.channels(); wfx.cbSize = 0; wfx.wFormatTag = WAVE_FORMAT_PCM; @@ -289,8 +289,8 @@ void QAudioOutputPrivate::close() return; deviceState = QAudio::StoppedState; - int delay = (buffer_size-bytesFree())*1000/(settings.sampleRate() - *settings.channelCount()*(settings.sampleSize()/8)); + int delay = (buffer_size-bytesFree())*1000/(settings.frequency() + *settings.channels()*(settings.sampleSize()/8)); waveOutReset(hWaveOut); Sleep(delay+10); @@ -386,8 +386,8 @@ qint64 QAudioOutputPrivate::write( const char *data, qint64 len ) LeaveCriticalSection(&waveOutCriticalSection); #endif totalTimeValue += current->dwBufferLength - /(settings.channelCount()*(settings.sampleSize()/8)) - *1000000/settings.sampleRate();; + /(settings.channels()*(settings.sampleSize()/8)) + *1000000/settings.frequency();; waveCurrentBlock++; waveCurrentBlock %= buffer_size/period_size; current = &waveBlocks[waveCurrentBlock]; diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp index 0c91d5c..d3d81e6 100644 --- a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp +++ b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp @@ -128,7 +128,7 @@ void tst_QAudioDeviceInfo::codecs() void tst_QAudioDeviceInfo::channels() { if(available) { - QList avail = device->supportedChannelCounts(); + QList avail = device->supportedChannels(); QVERIFY(avail.size() > 0); } } @@ -160,7 +160,7 @@ void tst_QAudioDeviceInfo::sampleTypes() void tst_QAudioDeviceInfo::frequencies() { if(available) { - QList avail = device->supportedSampleRates(); + QList avail = device->supportedFrequencies(); QVERIFY(avail.size() > 0); } } @@ -185,8 +185,8 @@ void tst_QAudioDeviceInfo::preferred() { if(available) { QAudioFormat format = device->preferredFormat(); - QVERIFY(format.sampleRate() == 44100); - QVERIFY(format.channelCount() == 2); + QVERIFY(format.frequency() == 44100); + QVERIFY(format.channels() == 2); } } @@ -194,9 +194,9 @@ void tst_QAudioDeviceInfo::nearest() { if(available) { QAudioFormat format1, format2; - format1.setSampleRate(8000); + format1.setFrequency(8000); format2 = device->nearestFormat(format1); - QVERIFY(format2.sampleRate() == 44100); + QVERIFY(format2.frequency() == 44100); } } diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp index 1d3f313..b36af03 100644 --- a/tests/auto/qaudioformat/tst_qaudioformat.cpp +++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp @@ -78,7 +78,11 @@ void tst_QAudioFormat::checkNull() QVERIFY(!audioFormat1.isValid()); audioFormat0.setFrequency(44100); +<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setChannels(2); +======= + audioFormat0.setChannelCount(2); +>>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setSampleSize(16); audioFormat0.setCodec("audio/pcm"); audioFormat0.setSampleType(QAudioFormat::SignedInt); @@ -88,14 +92,18 @@ void tst_QAudioFormat::checkNull() void tst_QAudioFormat::checkFrequency() { QAudioFormat audioFormat; - audioFormat.setSampleRate(44100); - QVERIFY(audioFormat.sampleRate() == 44100); + audioFormat.setFrequency(44100); + QVERIFY(audioFormat.frequency() == 44100); } void tst_QAudioFormat::checkChannels() { QAudioFormat audioFormat; +<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat.setChannels(2); +======= + audioFormat.setChannelCount(2); +>>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp QVERIFY(audioFormat.channels() == 2); } @@ -138,14 +146,22 @@ void tst_QAudioFormat::checkEquality() // on filled formats audioFormat0.setFrequency(8000); +<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setChannels(1); +======= + audioFormat0.setChannelCount(1); +>>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); audioFormat0.setSampleType(QAudioFormat::UnSignedInt); audioFormat1.setFrequency(8000); +<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat1.setChannels(1); +======= + audioFormat1.setChannelCount(1); +>>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat1.setSampleSize(8); audioFormat1.setCodec("audio/pcm"); audioFormat1.setByteOrder(QAudioFormat::LittleEndian); @@ -154,7 +170,7 @@ void tst_QAudioFormat::checkEquality() QVERIFY(audioFormat0 == audioFormat1); QVERIFY(!(audioFormat0 != audioFormat1)); - audioFormat0.setSampleRate(44100); + audioFormat0.setFrequency(44100); QVERIFY(audioFormat0 != audioFormat1); QVERIFY(!(audioFormat0 == audioFormat1)); } @@ -165,7 +181,11 @@ void tst_QAudioFormat::checkAssignment() QAudioFormat audioFormat1; audioFormat0.setFrequency(8000); +<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setChannels(1); +======= + audioFormat0.setChannelCount(1); +>>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp index d17a12a..40b7fbb 100644 --- a/tests/auto/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp @@ -94,8 +94,8 @@ void tst_QAudioInput::settings() // Confirm the setting we added in the init function. QAudioFormat f = audio->format(); - QVERIFY(format.channelCount() == f.channelCount()); - QVERIFY(format.sampleRate() == f.sampleRate()); + QVERIFY(format.channels() == f.channels()); + QVERIFY(format.frequency() == f.frequency()); QVERIFY(format.sampleSize() == f.sampleSize()); QVERIFY(format.codec() == f.codec()); QVERIFY(format.byteOrder() == f.byteOrder()); diff --git a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp index e1b73da..aeb2286 100644 --- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp +++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp @@ -95,8 +95,8 @@ void tst_QAudioOutput::settings() // Confirm the setting we added in the init function. QAudioFormat f = audio->format(); - QVERIFY(format.channelCount() == f.channelCount()); - QVERIFY(format.sampleRate() == f.sampleRate()); + QVERIFY(format.channels() == f.channels()); + QVERIFY(format.frequency() == f.frequency()); QVERIFY(format.sampleSize() == f.sampleSize()); QVERIFY(format.codec() == f.codec()); QVERIFY(format.byteOrder() == f.byteOrder()); -- cgit v0.12 From 5a91631ed3ac6a0d792d0445290a01f3e0f5d7d3 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 14 Jan 2010 12:04:05 +1000 Subject: Revert "Frequency to SampleRate and channels to channelCount." missed unit test. This reverts commit 80d4a4945d3273a4b2ce91e34597533f661af320. unit test missed on last revert. --- tests/auto/qaudioformat/tst_qaudioformat.cpp | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp index b36af03..0206798 100644 --- a/tests/auto/qaudioformat/tst_qaudioformat.cpp +++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp @@ -78,11 +78,7 @@ void tst_QAudioFormat::checkNull() QVERIFY(!audioFormat1.isValid()); audioFormat0.setFrequency(44100); -<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setChannels(2); -======= - audioFormat0.setChannelCount(2); ->>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setSampleSize(16); audioFormat0.setCodec("audio/pcm"); audioFormat0.setSampleType(QAudioFormat::SignedInt); @@ -99,11 +95,7 @@ void tst_QAudioFormat::checkFrequency() void tst_QAudioFormat::checkChannels() { QAudioFormat audioFormat; -<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat.setChannels(2); -======= - audioFormat.setChannelCount(2); ->>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp QVERIFY(audioFormat.channels() == 2); } @@ -146,22 +138,14 @@ void tst_QAudioFormat::checkEquality() // on filled formats audioFormat0.setFrequency(8000); -<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setChannels(1); -======= - audioFormat0.setChannelCount(1); ->>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); audioFormat0.setSampleType(QAudioFormat::UnSignedInt); audioFormat1.setFrequency(8000); -<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat1.setChannels(1); -======= - audioFormat1.setChannelCount(1); ->>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat1.setSampleSize(8); audioFormat1.setCodec("audio/pcm"); audioFormat1.setByteOrder(QAudioFormat::LittleEndian); @@ -181,11 +165,7 @@ void tst_QAudioFormat::checkAssignment() QAudioFormat audioFormat1; audioFormat0.setFrequency(8000); -<<<<<<< HEAD:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setChannels(1); -======= - audioFormat0.setChannelCount(1); ->>>>>>> 80d4a49... Frequency to SampleRate and channels to channelCount.:tests/auto/qaudioformat/tst_qaudioformat.cpp audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); -- cgit v0.12