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/qaudioformat | |
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/qaudioformat')
-rw-r--r-- | tests/auto/qaudioformat/tst_qaudioformat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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"); |