summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudioformat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudioformat.cpp')
-rw-r--r--src/multimedia/audio/qaudioformat.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudioformat.cpp b/src/multimedia/audio/qaudioformat.cpp
index 6ed72516c..39a36f0fb 100644
--- a/src/multimedia/audio/qaudioformat.cpp
+++ b/src/multimedia/audio/qaudioformat.cpp
@@ -403,5 +403,46 @@ QAudioFormat::SampleType QAudioFormat::sampleType() const
\value LittleEndian Samples are little endian byte order
*/
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug dbg, QAudioFormat::Endian endian)
+{
+ switch (endian) {
+ case QAudioFormat::BigEndian:
+ return dbg.nospace() << "BigEndian";
+ case QAudioFormat::LittleEndian:
+ return dbg.nospace() << "LittleEndian";
+ }
+}
+
+QDebug operator<<(QDebug dbg, QAudioFormat::SampleType type)
+{
+ switch (type) {
+ case QAudioFormat::SignedInt:
+ return dbg.nospace() << "SignedInt";
+ case QAudioFormat::UnSignedInt:
+ return dbg.nospace() << "UnSignedInt";
+ case QAudioFormat::Float:
+ return dbg.nospace() << "Float";
+ default:
+ return dbg.nospace() << "Unknown";
+ }
+}
+
+QDebug operator<<(QDebug dbg, const QAudioFormat &f)
+{
+ dbg.nospace() << "QAudioFormat(" << f.sampleRate();
+ dbg.nospace() << "Hz, " << f.sampleSize();
+ dbg.nospace() << "bit, channelCount=" << f.channelCount();
+ dbg.nospace() << ", sampleType=" << f.sampleType();
+ dbg.nospace() << ", byteOrder=" << f.byteOrder();
+ dbg.nospace() << ", codec=" << f.codec();
+ dbg.nospace() << ")";
+
+ return dbg.space();
+}
+#endif
+
+
+
QT_END_NAMESPACE