summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaudioinput
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2009-11-10 03:07:46 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2009-11-10 03:07:46 (GMT)
commit74d3a4bf9654c8bbe9139951cc5c9352015438a6 (patch)
tree63cc04b5546454fcf668125169c6793fcdbdf04c /tests/auto/qaudioinput
parent8df98549a4d84b5877e50318140c2041e17632fb (diff)
downloadQt-74d3a4bf9654c8bbe9139951cc5c9352015438a6.zip
Qt-74d3a4bf9654c8bbe9139951cc5c9352015438a6.tar.gz
Qt-74d3a4bf9654c8bbe9139951cc5c9352015438a6.tar.bz2
Changes to low-level audio API.
QAudioFormat::isNull() -> QAudioFormat::isValid() (inverse logic) QAudio::SuspendState -> QAudio::SuspendedState QAudio::StopState -> QAudio::StoppedState QAudioDeviceInfo::deviceList() -> QAudioDeviceInfo::availableDevices() clock() -> elapsedUSecs() totalTime() -> processedUSecs() QIODevice* start(QIODevice*) -> void start(QIODevice*), QIODevice* start() Reviewed-by:Justin McPherson
Diffstat (limited to 'tests/auto/qaudioinput')
-rw-r--r--tests/auto/qaudioinput/tst_qaudioinput.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/qaudioinput/tst_qaudioinput.cpp b/tests/auto/qaudioinput/tst_qaudioinput.cpp
index 744ce38..3efc346 100644
--- a/tests/auto/qaudioinput/tst_qaudioinput.cpp
+++ b/tests/auto/qaudioinput/tst_qaudioinput.cpp
@@ -76,7 +76,7 @@ void tst_QAudioInput::initTestCase()
format.setSampleType(QAudioFormat::UnSignedInt);
// Only perform tests if audio input device exists!
- QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::deviceList(QAudio::AudioInput);
if(devices.size() > 0)
available = true;
else {
@@ -137,16 +137,16 @@ void tst_QAudioInput::pullFile()
QSignalSpy stateSignal(audio, SIGNAL(stateChanged(QAudio::State)));
// Always have default states, before start
- QVERIFY(audio->state() == QAudio::StoppedState);
+ QVERIFY(audio->state() == QAudio::StopState);
QVERIFY(audio->error() == QAudio::NoError);
- QVERIFY(audio->elapsedUSecs() == 0);
+ QVERIFY(audio->clock() == 0);
audio->start(&filename);
QTest::qWait(20);
// Check state and periodSize() are valid non-zero values.
QVERIFY(audio->state() == QAudio::ActiveState);
QVERIFY(audio->error() == QAudio::NoError);
- QVERIFY(audio->elapsedUSecs() > 10000 && audio->elapsedUSecs() < 800000);
+ QVERIFY(audio->clock() > 10000 && audio->clock() < 800000);
QVERIFY(audio->periodSize() > 0);
QVERIFY(stateSignal.count() == 1); // State changed to QAudio::ActiveState
@@ -154,12 +154,12 @@ void tst_QAudioInput::pullFile()
QTest::qWait(5000);
QVERIFY(readSignal.count() > 0);
- QVERIFY(audio->processedUSecs() > 0);
+ QVERIFY(audio->totalTime() > 0);
audio->stop();
QTest::qWait(20);
- QVERIFY(audio->state() == QAudio::StoppedState);
- QVERIFY(audio->elapsedUSecs() == 0);
+ QVERIFY(audio->state() == QAudio::StopState);
+ QVERIFY(audio->clock() == 0);
// Can only check to make sure we got at least 1 more signal, but can be more.
QVERIFY(stateSignal.count() > 1);