Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.3
-
None
-
Ubuntu 10.04
-
e620e6626454f0ee10655033841baa6e3b2f4990
Description
Switching the AudioInput example to push mode does not work (app crashes eventually). It works fine when not in push mode.
The SpectrumView demo does not work in record and playback mode.
I stepped through the SpectrumView demo in the example and see that if fails when we try to read from the QIODevice. The preliminary call to QAudioInput::bytesReady () returns a valid number of bytes, but an internal call to the same function called within the reimplementation of QIODevice::readData returns a negative number,
Subsequent calls to QAudioInput::bytesReady() when the slot is called again seem to always return -32 (causing all sorts of fun and games in the spectrum view demo as it assumes the bytesReady is +ve)
Modifying the code slightly to not call bytesReady and just calling QIODevice::readAll works.