Delete obsolete class methods and update related code
Delete obsolete methods from QAudioFormat and QAudioDeviceInfo and update code that relied on the obsolete methods. Change-Id: I007e36375a45399b1d5a289341bc5d5a05dc68cc Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
952bd004be
commit
53fdcca366
@@ -274,7 +274,7 @@ bool QPulseAudioOutput::open()
|
||||
QPulseAudioEngine *pulseEngine = QPulseAudioEngine::instance();
|
||||
pa_threaded_mainloop_lock(pulseEngine->mainloop());
|
||||
|
||||
qint64 bytesPerSecond = m_format.sampleRate() * m_format.channels() * m_format.sampleSize() / 8;
|
||||
qint64 bytesPerSecond = m_format.sampleRate() * m_format.channelCount() * m_format.sampleSize() / 8;
|
||||
|
||||
pa_proplist *propList = pa_proplist_new();
|
||||
if (m_category.isNull()) {
|
||||
@@ -503,8 +503,8 @@ int QPulseAudioOutput::notifyInterval() const
|
||||
qint64 QPulseAudioOutput::processedUSecs() const
|
||||
{
|
||||
qint64 result = qint64(1000000) * m_totalTimeValue /
|
||||
(m_format.channels() * (m_format.sampleSize() / 8)) /
|
||||
m_format.frequency();
|
||||
(m_format.channelCount() * (m_format.sampleSize() / 8)) /
|
||||
m_format.sampleRate();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format)
|
||||
{
|
||||
pa_sample_spec spec;
|
||||
|
||||
spec.rate = format.frequency();
|
||||
spec.channels = format.channels();
|
||||
spec.rate = format.sampleRate();
|
||||
spec.channels = format.channelCount();
|
||||
|
||||
if (format.sampleSize() == 8) {
|
||||
spec.format = PA_SAMPLE_U8;
|
||||
@@ -139,7 +139,7 @@ QString stateToQString(pa_context_state_t state)
|
||||
QAudioFormat sampleSpecToAudioFormat(pa_sample_spec spec)
|
||||
{
|
||||
QAudioFormat format;
|
||||
format.setFrequency(spec.rate);
|
||||
format.setSampleRate(spec.rate);
|
||||
format.setChannelCount(spec.channels);
|
||||
format.setCodec("audio/pcm");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user