WMF: fix start time of buffers provided by QAudioDecoder.

The time was in milliseconds but should be in microseconds.

Task-number: QTBUG-45571
Change-Id: I54f07975e7a6233254a338dcde8075f740b5455c
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
Yoann Lopes
2015-04-16 11:30:08 +02:00
parent aaff15aec6
commit b0111ce5f5

View File

@@ -389,7 +389,8 @@ void MFAudioDecoderControl::handleSampleAdded()
s->Release(); s->Release();
} }
} }
m_cachedAudioBuffer = QAudioBuffer(abuf, m_audioFormat, qint64(sampleStartTime / 10000)); // WMF uses 100-nanosecond units, QAudioDecoder uses milliseconds, QAudioBuffer uses microseconds...
m_cachedAudioBuffer = QAudioBuffer(abuf, m_audioFormat, qint64(sampleStartTime / 10));
m_bufferReady = true; m_bufferReady = true;
emit positionChanged(m_position); emit positionChanged(m_position);
emit bufferAvailableChanged(m_bufferReady); emit bufferAvailableChanged(m_bufferReady);