summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudio_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/multimedia/audio/qaudio_mac.cpp')
-rw-r--r--src/multimedia/audio/qaudio_mac.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/multimedia/audio/qaudio_mac.cpp b/src/multimedia/audio/qaudio_mac.cpp
index 61a00ce..14fee8b 100644
--- a/src/multimedia/audio/qaudio_mac.cpp
+++ b/src/multimedia/audio/qaudio_mac.cpp
@@ -48,8 +48,8 @@ QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug dbg, const QAudioFormat& audioFormat)
{
dbg.nospace() << "QAudioFormat(" <<
- audioFormat.sampleRate() << "," <<
- audioFormat.channelCount() << "," <<
+ audioFormat.frequency() << "," <<
+ audioFormat.channels() << "," <<
audioFormat.sampleSize()<< "," <<
audioFormat.codec() << "," <<
audioFormat.byteOrder() << "," <<
@@ -64,8 +64,8 @@ QAudioFormat toQAudioFormat(AudioStreamBasicDescription const& sf)
{
QAudioFormat audioFormat;
- audioFormat.setSampleRate(sf.mSampleRate);
- audioFormat.setChannelCount(sf.mChannelsPerFrame);
+ audioFormat.setFrequency(sf.mSampleRate);
+ audioFormat.setChannels(sf.mChannelsPerFrame);
audioFormat.setSampleSize(sf.mBitsPerChannel);
audioFormat.setCodec(QString::fromLatin1("audio/pcm"));
audioFormat.setByteOrder(sf.mFormatFlags & kLinearPCMFormatFlagIsBigEndian != 0 ? QAudioFormat::BigEndian : QAudioFormat::LittleEndian);
@@ -84,9 +84,9 @@ AudioStreamBasicDescription toAudioStreamBasicDescription(QAudioFormat const& au
AudioStreamBasicDescription sf;
sf.mFormatFlags = kAudioFormatFlagIsPacked;
- sf.mSampleRate = audioFormat.sampleRate();
+ sf.mSampleRate = audioFormat.frequency();
sf.mFramesPerPacket = 1;
- sf.mChannelsPerFrame = audioFormat.channelCount();
+ sf.mChannelsPerFrame = audioFormat.channels();
sf.mBitsPerChannel = audioFormat.sampleSize();
sf.mBytesPerFrame = sf.mChannelsPerFrame * (sf.mBitsPerChannel / 8);
sf.mBytesPerPacket = sf.mFramesPerPacket * sf.mBytesPerFrame;