diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2010-01-06 03:45:05 (GMT) |
---|---|---|
committer | Kurt Korbatits <kurt.korbatits@nokia.com> | 2010-01-06 03:45:05 (GMT) |
commit | 80d4a4945d3273a4b2ce91e34597533f661af320 (patch) | |
tree | 3f861af1fcf0813cf63e57591b62e887f4329469 /tests/auto | |
parent | f124538ef4840c3d24b4c7e9e7221adb52bdee2c (diff) | |
download | Qt-80d4a4945d3273a4b2ce91e34597533f661af320.zip Qt-80d4a4945d3273a4b2ce91e34597533f661af320.tar.gz Qt-80d4a4945d3273a4b2ce91e34597533f661af320.tar.bz2 |
Frequency to SampleRate and channels to channelCount.
-Added channelCount(), changed everything to use this instead
of channels() in QAudioFormat class.
-Added setSampleRate() and sampleRate(), changed everthing to use these
instead of setFrequency() and frequency() in QAudioFormat class.
-Added supportedSampleRates() and supportedChannelCounts(), changed
everything to use these instead of supportedFrequencies() and
supportedChannels() in QAudioDeviceInfo class.
Reviewed-by:Justin McPherson
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp | 14 | ||||
-rw-r--r-- | tests/auto/qaudioformat/tst_qaudioformat.cpp | 16 | ||||
-rw-r--r-- | tests/auto/qaudioinput/tst_qaudioinput.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qaudiooutput/tst_qaudiooutput.cpp | 6 |
4 files changed, 21 insertions, 21 deletions
diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp index 14cf6b3..2270eb2 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<int> avail = device->supportedChannels(); + QList<int> avail = device->supportedChannelCounts(); QVERIFY(avail.size() > 0); } } @@ -160,7 +160,7 @@ void tst_QAudioDeviceInfo::sampleTypes() void tst_QAudioDeviceInfo::frequencies() { if(available) { - QList<int> avail = device->supportedFrequencies(); + QList<int> avail = device->supportedSampleRates(); QVERIFY(avail.size() > 0); } } @@ -169,7 +169,7 @@ void tst_QAudioDeviceInfo::isformat() { if(available) { QAudioFormat format; - format.setFrequency(44100); + format.setSampleRate(44100); format.setChannelCount(2); format.setSampleType(QAudioFormat::SignedInt); format.setByteOrder(QAudioFormat::LittleEndian); @@ -185,8 +185,8 @@ void tst_QAudioDeviceInfo::preferred() { if(available) { QAudioFormat format = device->preferredFormat(); - QVERIFY(format.frequency() == 44100); - QVERIFY(format.channels() == 2); + QVERIFY(format.sampleRate() == 44100); + QVERIFY(format.channelCount() == 2); } } @@ -194,9 +194,9 @@ void tst_QAudioDeviceInfo::nearest() { if(available) { QAudioFormat format1, format2; - format1.setFrequency(8000); + format1.setSampleRate(8000); format2 = device->nearestFormat(format1); - QVERIFY(format2.frequency() == 44100); + QVERIFY(format2.sampleRate() == 44100); } } diff --git a/tests/auto/qaudioformat/tst_qaudioformat.cpp b/tests/auto/qaudioformat/tst_qaudioformat.cpp index 2742dd7..5237dca 100644 --- a/tests/auto/qaudioformat/tst_qaudioformat.cpp +++ b/tests/auto/qaudioformat/tst_qaudioformat.cpp @@ -77,7 +77,7 @@ void tst_QAudioFormat::checkNull() QAudioFormat audioFormat1(audioFormat0); QVERIFY(!audioFormat1.isValid()); - audioFormat0.setFrequency(44100); + audioFormat0.setSampleRate(44100); audioFormat0.setChannelCount(2); audioFormat0.setSampleSize(16); audioFormat0.setCodec("audio/pcm"); @@ -88,15 +88,15 @@ void tst_QAudioFormat::checkNull() void tst_QAudioFormat::checkFrequency() { QAudioFormat audioFormat; - audioFormat.setFrequency(44100); - QVERIFY(audioFormat.frequency() == 44100); + audioFormat.setSampleRate(44100); + QVERIFY(audioFormat.sampleRate() == 44100); } void tst_QAudioFormat::checkChannels() { QAudioFormat audioFormat; audioFormat.setChannelCount(2); - QVERIFY(audioFormat.channels() == 2); + QVERIFY(audioFormat.channelCount() == 2); } void tst_QAudioFormat::checkSampleSize() @@ -137,14 +137,14 @@ void tst_QAudioFormat::checkEquality() QVERIFY(!(audioFormat0 != audioFormat1)); // on filled formats - audioFormat0.setFrequency(8000); + audioFormat0.setSampleRate(8000); audioFormat0.setChannelCount(1); audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); audioFormat0.setByteOrder(QAudioFormat::LittleEndian); audioFormat0.setSampleType(QAudioFormat::UnSignedInt); - audioFormat1.setFrequency(8000); + audioFormat1.setSampleRate(8000); audioFormat1.setChannelCount(1); audioFormat1.setSampleSize(8); audioFormat1.setCodec("audio/pcm"); @@ -154,7 +154,7 @@ void tst_QAudioFormat::checkEquality() QVERIFY(audioFormat0 == audioFormat1); QVERIFY(!(audioFormat0 != audioFormat1)); - audioFormat0.setFrequency(44100); + audioFormat0.setSampleRate(44100); QVERIFY(audioFormat0 != audioFormat1); QVERIFY(!(audioFormat0 == audioFormat1)); } @@ -164,7 +164,7 @@ void tst_QAudioFormat::checkAssignment() QAudioFormat audioFormat0; QAudioFormat audioFormat1; - audioFormat0.setFrequency(8000); + audioFormat0.setSampleRate(8000); audioFormat0.setChannelCount(1); audioFormat0.setSampleSize(8); audioFormat0.setCodec("audio/pcm"); diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp index 40bf01f..994e9ef 100644 --- a/tests/auto/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp @@ -68,7 +68,7 @@ private: void tst_QAudioInput::initTestCase() { - format.setFrequency(8000); + format.setSampleRate(8000); format.setChannelCount(1); format.setSampleSize(8); format.setCodec("audio/pcm"); @@ -94,8 +94,8 @@ void tst_QAudioInput::settings() // Confirm the setting we added in the init function. QAudioFormat f = audio->format(); - QVERIFY(format.channels() == f.channels()); - QVERIFY(format.frequency() == f.frequency()); + QVERIFY(format.channelCount() == f.channelCount()); + QVERIFY(format.sampleRate() == f.sampleRate()); 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 f3feec1..60d0124 100644 --- a/tests/auto/qaudiooutput/tst_qaudiooutput.cpp +++ b/tests/auto/qaudiooutput/tst_qaudiooutput.cpp @@ -71,7 +71,7 @@ private: void tst_QAudioOutput::initTestCase() { - format.setFrequency(8000); + format.setSampleRate(8000); format.setChannelCount(1); format.setSampleSize(8); format.setCodec("audio/pcm"); @@ -95,8 +95,8 @@ void tst_QAudioOutput::settings() // Confirm the setting we added in the init function. QAudioFormat f = audio->format(); - QVERIFY(format.channels() == f.channels()); - QVERIFY(format.frequency() == f.frequency()); + QVERIFY(format.channelCount() == f.channelCount()); + QVERIFY(format.sampleRate() == f.sampleRate()); QVERIFY(format.sampleSize() == f.sampleSize()); QVERIFY(format.codec() == f.codec()); QVERIFY(format.byteOrder() == f.byteOrder()); |