Fixed qaudioinput unit test with pulseaudio backend

- notify signal wasn't being emitted enough.
- range checking on processedUSecs extended.

Change-Id: Icfa1f3b364a7e0f9d3f37abd8dc5ed0c1e22f923
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
Kurt Korbatits
2012-07-11 07:54:31 +10:00
committed by Qt by Nokia
parent 9025bec242
commit 51d7737c19
2 changed files with 17 additions and 5 deletions

View File

@@ -513,6 +513,12 @@ qint64 QPulseAudioInput::read(char *data, qint64 len)
if (!m_pullMode && readBytes >= len)
break;
if (m_intervalTime && (m_timeStamp.elapsed() + m_elapsedTimeOffset) > m_intervalTime) {
emit notify();
m_elapsedTimeOffset = m_timeStamp.elapsed() + m_elapsedTimeOffset - m_intervalTime;
m_timeStamp.restart();
}
}
#ifdef DEBUG_PULSE