summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiooutput_mac_p.cpp
diff options
context:
space:
mode:
authorKurt Korbatits <kurt.korbatits@nokia.com>2010-01-06 03:45:05 (GMT)
committerKurt Korbatits <kurt.korbatits@nokia.com>2010-01-06 03:45:05 (GMT)
commit80d4a4945d3273a4b2ce91e34597533f661af320 (patch)
tree3f861af1fcf0813cf63e57591b62e887f4329469 /src/multimedia/audio/qaudiooutput_mac_p.cpp
parentf124538ef4840c3d24b4c7e9e7221adb52bdee2c (diff)
downloadQt-80d4a4945d3273a4b2ce91e34597533f661af320.zip
Qt-80d4a4945d3273a4b2ce91e34597533f661af320.tar.gz
Qt-80d4a4945d3273a4b2ce91e34597533f661af320.tar.bz2
Frequency to SampleRate and channels to channelCount.
-Added channelCount(), changed everything to use this instead of channels() in QAudioFormat class. -Added setSampleRate() and sampleRate(), changed everthing to use these instead of setFrequency() and frequency() in QAudioFormat class. -Added supportedSampleRates() and supportedChannelCounts(), changed everything to use these instead of supportedFrequencies() and supportedChannels() in QAudioDeviceInfo class. Reviewed-by:Justin McPherson
Diffstat (limited to 'src/multimedia/audio/qaudiooutput_mac_p.cpp')
-rw-r--r--src/multimedia/audio/qaudiooutput_mac_p.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/multimedia/audio/qaudiooutput_mac_p.cpp b/src/multimedia/audio/qaudiooutput_mac_p.cpp
index e0651bf..2dec43d 100644
--- a/src/multimedia/audio/qaudiooutput_mac_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_mac_p.cpp
@@ -87,8 +87,8 @@ public:
m_device(0)
{
m_buffer = new QAudioRingBuffer(bufferSize + (bufferSize % maxPeriodSize == 0 ? 0 : maxPeriodSize - (bufferSize % maxPeriodSize)));
- m_bytesPerFrame = (audioFormat.sampleSize() / 8) * audioFormat.channels();
- m_periodTime = m_maxPeriodSize / m_bytesPerFrame * 1000 / audioFormat.frequency();
+ m_bytesPerFrame = (audioFormat.sampleSize() / 8) * audioFormat.channelCount();
+ m_periodTime = m_maxPeriodSize / m_bytesPerFrame * 1000 / audioFormat.sampleRate();
m_fillTimer = new QTimer(this);
connect(m_fillTimer, SIGNAL(timeout()), SLOT(fillBuffer()));
@@ -546,7 +546,7 @@ int QAudioOutputPrivate::notifyInterval() const
qint64 QAudioOutputPrivate::processedUSecs() const
{
- return totalFrames * 1000000 / audioFormat.frequency();
+ return totalFrames * 1000000 / audioFormat.sampleRate();
}
qint64 QAudioOutputPrivate::elapsedUSecs() const