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:
@@ -434,7 +434,7 @@ qint64 QWindowsAudioOutput::write( const char *data, qint64 len )
|
|||||||
void QWindowsAudioOutput::resume()
|
void QWindowsAudioOutput::resume()
|
||||||
{
|
{
|
||||||
if(deviceState == QAudio::SuspendedState) {
|
if(deviceState == QAudio::SuspendedState) {
|
||||||
deviceState = QAudio::ActiveState;
|
deviceState = pullMode ? QAudio::ActiveState : QAudio::IdleState;
|
||||||
errorState = QAudio::NoError;
|
errorState = QAudio::NoError;
|
||||||
waveOutRestart(hWaveOut);
|
waveOutRestart(hWaveOut);
|
||||||
QTimer::singleShot(10, this, SLOT(feedback()));
|
QTimer::singleShot(10, this, SLOT(feedback()));
|
||||||
|
|||||||
Reference in New Issue
Block a user