Fix integer overflow in several audio plugins.

Task-number: QTBUG-40804
Change-Id: If006cb7db319bb6fda4ce7eb4f907e897b5d9efa
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
Yoann Lopes
2014-09-03 14:45:50 +02:00
parent 006cdeee92
commit 18d6560db1
10 changed files with 10 additions and 10 deletions

View File

@@ -768,7 +768,7 @@ qint64 QAlsaAudioInput::elapsedUSecs() const
if (deviceState == QAudio::StoppedState) if (deviceState == QAudio::StoppedState)
return 0; return 0;
return clockStamp.elapsed()*1000; return clockStamp.elapsed() * qint64(1000);
} }
void QAlsaAudioInput::reset() void QAlsaAudioInput::reset()

View File

@@ -782,7 +782,7 @@ qint64 QAlsaAudioOutput::elapsedUSecs() const
if (deviceState == QAudio::StoppedState) if (deviceState == QAudio::StoppedState)
return 0; return 0;
return clockStamp.elapsed()*1000; return clockStamp.elapsed() * qint64(1000);
} }
void QAlsaAudioOutput::reset() void QAlsaAudioOutput::reset()

View File

@@ -482,7 +482,7 @@ qint64 QOpenSLESAudioInput::elapsedUSecs() const
if (m_deviceState == QAudio::StoppedState) if (m_deviceState == QAudio::StoppedState)
return 0; return 0;
return m_clockStamp.elapsed() * 1000; return m_clockStamp.elapsed() * qint64(1000);
} }
void QOpenSLESAudioInput::setVolume(qreal vol) void QOpenSLESAudioInput::setVolume(qreal vol)

View File

@@ -290,7 +290,7 @@ qint64 QOpenSLESAudioOutput::elapsedUSecs() const
if (m_state == QAudio::StoppedState) if (m_state == QAudio::StoppedState)
return 0; return 0;
return m_clockStamp.elapsed() * 1000; return m_clockStamp.elapsed() * qint64(1000);
} }
void QOpenSLESAudioOutput::reset() void QOpenSLESAudioOutput::reset()

View File

@@ -692,7 +692,7 @@ qint64 QPulseAudioInput::elapsedUSecs() const
if (m_deviceState == QAudio::StoppedState) if (m_deviceState == QAudio::StoppedState)
return 0; return 0;
return m_clockStamp.elapsed() * 1000; return m_clockStamp.elapsed() * qint64(1000);
} }
void QPulseAudioInput::reset() void QPulseAudioInput::reset()

View File

@@ -591,7 +591,7 @@ qint64 QPulseAudioOutput::elapsedUSecs() const
if (m_deviceState == QAudio::StoppedState) if (m_deviceState == QAudio::StoppedState)
return 0; return 0;
return m_clockStamp.elapsed() * 1000; return m_clockStamp.elapsed() * qint64(1000);
} }
void QPulseAudioOutput::reset() void QPulseAudioOutput::reset()

View File

@@ -194,7 +194,7 @@ qint64 QnxAudioInput::elapsedUSecs() const
if (m_state == QAudio::StoppedState) if (m_state == QAudio::StoppedState)
return 0; return 0;
return m_clockStamp.elapsed() * 1000; return m_clockStamp.elapsed() * qint64(1000);
} }
QAudio::Error QnxAudioInput::error() const QAudio::Error QnxAudioInput::error() const

View File

@@ -180,7 +180,7 @@ qint64 QnxAudioOutput::elapsedUSecs() const
if (m_state == QAudio::StoppedState) if (m_state == QAudio::StoppedState)
return 0; return 0;
else else
return m_startTimeStamp.elapsed() * 1000; return m_startTimeStamp.elapsed() * qint64(1000);
} }
QAudio::Error QnxAudioOutput::error() const QAudio::Error QnxAudioOutput::error() const

View File

@@ -706,7 +706,7 @@ qint64 QWindowsAudioInput::elapsedUSecs() const
if (deviceState == QAudio::StoppedState) if (deviceState == QAudio::StoppedState)
return 0; return 0;
return timeStampOpened.elapsed()*1000; return timeStampOpened.elapsed() * qint64(1000);
} }
void QWindowsAudioInput::reset() void QWindowsAudioInput::reset()

View File

@@ -682,7 +682,7 @@ qint64 QWindowsAudioOutput::elapsedUSecs() const
if (deviceState == QAudio::StoppedState) if (deviceState == QAudio::StoppedState)
return 0; return 0;
return timeStampOpened.elapsed()*1000; return timeStampOpened.elapsed() * qint64(1000);
} }
QAudio::Error QWindowsAudioOutput::error() const QAudio::Error QWindowsAudioOutput::error() const