summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-08 02:29:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-08 02:29:05 (GMT)
commit118e7a807d0764dee97612589fe5d7072d271e1e (patch)
treee2d7e366acb46082c119c165e11a235c6eced9b5 /tests
parent2dde31f712b5952838d867966d99565e1c7c825d (diff)
parent3f3e86d6fce5bb781bc41def35d0f15c58ef769c (diff)
downloadQt-118e7a807d0764dee97612589fe5d7072d271e1e.zip
Qt-118e7a807d0764dee97612589fe5d7072d271e1e.tar.gz
Qt-118e7a807d0764dee97612589fe5d7072d271e1e.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team: QAudioInput loses data on Maemo5/other linux platforms. Fix warning in qfilesystemmodel_p.h Frequency to SampleRate and channels to channelCount. Added setChannelCount() to QAudioFormat.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp16
-rw-r--r--tests/auto/qaudioformat/tst_qaudioformat.cpp26
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp8
-rw-r--r--tests/auto/qaudiooutput/tst_qaudiooutput.cpp8
4 files changed, 29 insertions, 29 deletions
diff --git a/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp b/tests/auto/qaudiodeviceinfo/tst_qaudiodeviceinfo.cpp
index 715f219..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,8 +169,8 @@ void tst_QAudioDeviceInfo::isformat()
{
if(available) {
QAudioFormat format;
- format.setFrequency(44100);
- format.setChannels(2);
+ format.setSampleRate(44100);
+ format.setChannelCount(2);
format.setSampleType(QAudioFormat::SignedInt);
format.setByteOrder(QAudioFormat::LittleEndian);
format.setSampleSize(16);
@@ -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 0778a8e..5237dca 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.setFrequency(44100);
- audioFormat0.setChannels(2);
+ audioFormat0.setSampleRate(44100);
+ audioFormat0.setChannelCount(2);
audioFormat0.setSampleSize(16);
audioFormat0.setCodec("audio/pcm");
audioFormat0.setSampleType(QAudioFormat::SignedInt);
@@ -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.setChannels(2);
- QVERIFY(audioFormat.channels() == 2);
+ audioFormat.setChannelCount(2);
+ QVERIFY(audioFormat.channelCount() == 2);
}
void tst_QAudioFormat::checkSampleSize()
@@ -137,15 +137,15 @@ void tst_QAudioFormat::checkEquality()
QVERIFY(!(audioFormat0 != audioFormat1));
// on filled formats
- audioFormat0.setFrequency(8000);
- audioFormat0.setChannels(1);
+ 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.setChannels(1);
+ audioFormat1.setSampleRate(8000);
+ audioFormat1.setChannelCount(1);
audioFormat1.setSampleSize(8);
audioFormat1.setCodec("audio/pcm");
audioFormat1.setByteOrder(QAudioFormat::LittleEndian);
@@ -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,8 +164,8 @@ void tst_QAudioFormat::checkAssignment()
QAudioFormat audioFormat0;
QAudioFormat audioFormat1;
- audioFormat0.setFrequency(8000);
- audioFormat0.setChannels(1);
+ audioFormat0.setSampleRate(8000);
+ audioFormat0.setChannelCount(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 744ce38..994e9ef 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.setFrequency(8000);
- format.setChannels(1);
+ format.setSampleRate(8000);
+ format.setChannelCount(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@@ -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 26694cc..60d0124 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.setFrequency(8000);
- format.setChannels(1);
+ format.setSampleRate(8000);
+ format.setChannelCount(1);
format.setSampleSize(8);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@@ -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());