equal
deleted
inserted
replaced
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 */ |