OpenSL ES: Don't store or return the adjusted volume level.
According to our own docs we should always return 1.0 (MAX) volume level if the device doesn't support setting the volume, which is the case for OpenSL ES on Android. Task-number: QTBUG-42159 Change-Id: I9144e9e2cd84cc80633c68c5d6fa32b8dbd0fcd5 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
committed by
Christian Stromme
parent
d0ed4f3b08
commit
ad929984e3
@@ -70,7 +70,6 @@ QOpenSLESAudioInput::QOpenSLESAudioInput(const QByteArray &device)
|
|||||||
, m_errorState(QAudio::NoError)
|
, m_errorState(QAudio::NoError)
|
||||||
, m_deviceState(QAudio::StoppedState)
|
, m_deviceState(QAudio::StoppedState)
|
||||||
, m_lastNotifyTime(0)
|
, m_lastNotifyTime(0)
|
||||||
, m_volume(1)
|
|
||||||
, m_bufferSize(0)
|
, m_bufferSize(0)
|
||||||
, m_periodSize(0)
|
, m_periodSize(0)
|
||||||
, m_intervalTime(1000)
|
, m_intervalTime(1000)
|
||||||
@@ -480,12 +479,12 @@ qint64 QOpenSLESAudioInput::elapsedUSecs() const
|
|||||||
void QOpenSLESAudioInput::setVolume(qreal vol)
|
void QOpenSLESAudioInput::setVolume(qreal vol)
|
||||||
{
|
{
|
||||||
// Volume interface is not available for the recorder on Android
|
// Volume interface is not available for the recorder on Android
|
||||||
m_volume = vol;
|
Q_UNUSED(vol);
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal QOpenSLESAudioInput::volume() const
|
qreal QOpenSLESAudioInput::volume() const
|
||||||
{
|
{
|
||||||
return m_volume;
|
return qreal(1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QOpenSLESAudioInput::reset()
|
void QOpenSLESAudioInput::reset()
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ private:
|
|||||||
QAudio::State m_deviceState;
|
QAudio::State m_deviceState;
|
||||||
QTime m_clockStamp;
|
QTime m_clockStamp;
|
||||||
qint64 m_lastNotifyTime;
|
qint64 m_lastNotifyTime;
|
||||||
qreal m_volume;
|
|
||||||
int m_bufferSize;
|
int m_bufferSize;
|
||||||
int m_periodSize;
|
int m_periodSize;
|
||||||
int m_intervalTime;
|
int m_intervalTime;
|
||||||
|
|||||||
Reference in New Issue
Block a user