src/multimedia/audio/qaudioformat.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
--- a/src/multimedia/audio/qaudioformat.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/src/multimedia/audio/qaudioformat.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -38,7 +38,7 @@
 ** $QT_END_LICENSE$
 **
 ****************************************************************************/
-
+#include <QDebug>
 #include <QtMultimedia/qaudioformat.h>
 
 
@@ -214,16 +214,13 @@
 }
 
 /*!
-    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();
 }
 
 /*!