WindowsAudio: fix QAudioOutput state after resume().

In push mode, the state must be IdleState after resume(), and only
change to ActiveState once it receives some data.

Task-number: QTBUG-50390
Change-Id: I0e12f4eaff350b9423e44779f229e0e1061cf576
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
This commit is contained in:
Yoann Lopes
2016-01-19 13:35:33 +01:00
parent b4d03dc82f
commit f97c4aaa86

View File

@@ -434,7 +434,7 @@ qint64 QWindowsAudioOutput::write( const char *data, qint64 len )
void QWindowsAudioOutput::resume()
{
if(deviceState == QAudio::SuspendedState) {
deviceState = QAudio::ActiveState;
deviceState = pullMode ? QAudio::ActiveState : QAudio::IdleState;
errorState = QAudio::NoError;
waveOutRestart(hWaveOut);
QTimer::singleShot(10, this, SLOT(feedback()));