src/multimedia/audio/qaudioformat.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    36 **
    36 **
    37 **
    37 **
    38 ** $QT_END_LICENSE$
    38 ** $QT_END_LICENSE$
    39 **
    39 **
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 
    41 #include <QDebug>
    42 #include <QtMultimedia/qaudioformat.h>
    42 #include <QtMultimedia/qaudioformat.h>
    43 
    43 
    44 
    44 
    45 QT_BEGIN_NAMESPACE
    45 QT_BEGIN_NAMESPACE
    46 
    46 
   212 {
   212 {
   213     return !(*this == other);
   213     return !(*this == other);
   214 }
   214 }
   215 
   215 
   216 /*!
   216 /*!
   217     Returns true if any of the parameters are invalid.
   217     Returns true if all of the parameters are valid.
   218 */
   218 */
   219 
   219 
   220 bool QAudioFormat::isNull() const
   220 bool QAudioFormat::isValid() const
   221 {
   221 {
   222     return d->frequency == -1 && d->channels == -1 &&
   222     return d->frequency != -1 && d->channels != -1 && d->sampleSize != -1 &&
   223             d->sampleSize == -1 &&
   223             d->sampleType != QAudioFormat::Unknown && !d->codec.isEmpty();
   224             d->byteOrder == QAudioFormat::Endian(QSysInfo::ByteOrder) &&
       
   225             d->sampleType == QAudioFormat::Unknown &&
       
   226             d->codec.isNull();
       
   227 }
   224 }
   228 
   225 
   229 /*!
   226 /*!
   230    Sets the frequency to \a frequency.
   227    Sets the frequency to \a frequency.
   231 */
   228 */