summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioformat.cpp
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2009-11-05 04:18:38 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2009-11-10 03:55:12 (GMT)
commit75fb85bbf1b2dc473f99da72124daa65c5839e01 (patch)
tree83975d52d8430270372400c922f9764d5f7adbf6 /src/multimedia/audio/qaudioformat.cpp
parent74d3a4bf9654c8bbe9139951cc5c9352015438a6 (diff)
downloadQt-75fb85bbf1b2dc473f99da72124daa65c5839e01.zip
Qt-75fb85bbf1b2dc473f99da72124daa65c5839e01.tar.gz
Qt-75fb85bbf1b2dc473f99da72124daa65c5839e01.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 'src/multimedia/audio/qaudioformat.cpp')
-rw-r--r--src/multimedia/audio/qaudioformat.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 86fe85b..b2bbe14 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
+#include <QDebug>
#include <QtMultimedia/qaudioformat.h>
@@ -214,16 +214,13 @@ bool QAudioFormat::operator!=(const QAudioFormat& other) const
}
/*!
- Returns true if any of the parameters are invalid.
+ Returns true if all of the parameters are valid.
*/
-bool QAudioFormat::isNull() const
+bool QAudioFormat::isValid() const
{
- return d->frequency == -1 && d->channels == -1 &&
- d->sampleSize == -1 &&
- d->byteOrder == QAudioFormat::Endian(QSysInfo::ByteOrder) &&
- d->sampleType == QAudioFormat::Unknown &&
- d->codec.isNull();
+ return d->frequency != -1 && d->channels != -1 && d->sampleSize != -1 &&
+ d->sampleType != QAudioFormat::Unknown && !d->codec.isEmpty();
}
/*!