summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudio_mac.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-22 04:33:31 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-22 04:33:31 (GMT)
commit5238e6a592c43f19a7151d20e36908f1f1a44df8 (patch)
tree73266cca2e934073a74dae15e3a13e3e4a3a7b6f /src/multimedia/audio/qaudio_mac.cpp
parenta12b94c9dd7fc7193c0b7464ca6ea522ef0235fb (diff)
parent76c256bdabcc207a6ed70d5b5b62698495548a25 (diff)
downloadQt-5238e6a592c43f19a7151d20e36908f1f1a44df8.zip
Qt-5238e6a592c43f19a7151d20e36908f1f1a44df8.tar.gz
Qt-5238e6a592c43f19a7151d20e36908f1f1a44df8.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: Audio(osx); Fix period size calculation. Audio(osx); refactor input period conversion Audio(osx); Fix audio format converters.
Diffstat (limited to 'src/multimedia/audio/qaudio_mac.cpp')
-rw-r--r--src/multimedia/audio/qaudio_mac.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp
index 14fee8b..4e17b52 100644
--- a/src/multimedia/audio/qaudio_mac.cpp
+++ b/src/multimedia/audio/qaudio_mac.cpp
@@ -68,11 +68,11 @@ QAudioFormat toQAudioFormat(AudioStreamBasicDescription const& sf)
audioFormat.setChannels(sf.mChannelsPerFrame);
audioFormat.setSampleSize(sf.mBitsPerChannel);
audioFormat.setCodec(QString::fromLatin1("audio/pcm"));
- audioFormat.setByteOrder(sf.mFormatFlags & kLinearPCMFormatFlagIsBigEndian != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
+ audioFormat.setByteOrder((sf.mFormatFlags & kAudioFormatFlagIsBigEndian) != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
QAudioFormat::SampleType type = QAudioFormat::UnSignedInt;
- if ((sf.mFormatFlags & kLinearPCMFormatFlagIsSignedInteger) != 0)
+ if ((sf.mFormatFlags & kAudioFormatFlagIsSignedInteger) != 0)
type = QAudioFormat::SignedInt;
- else if ((sf.mFormatFlags & kLinearPCMFormatFlagIsFloat) != 0)
+ else if ((sf.mFormatFlags & kAudioFormatFlagIsFloat) != 0)
type = QAudioFormat::Float;
audioFormat.setSampleType(type);
@@ -99,6 +99,9 @@ AudioStreamBasicDescription toAudioStreamBasicDescription(QAudioFormat const& au
case QAudioFormat::Unknown: default: break;
}
+ if (audioFormat.byteOrder() == QAudioFormat::BigEndian)
+ sf.mFormatFlags |= kAudioFormatFlagIsBigEndian;
+
return sf;
}