Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.2.0 Beta1
-
None
Description
not tested yet on windows
I connect the error handler thusly:
ASSERT(connect(&m_decoder, static_cast<void (QAudioDecoder::*)(QAudioDecoder::Error)>(&QAudioDecoder::error), this, &AudioFileStream::handle_error));
note the function signature in QAudioDecoder is this:
void error(QAudioDecoder::Error error);
but the signal sent is this:
void AVFAudioDecoder::processInvalidMedia(QAudioDecoder::Error errorCode, const QString& errorString) { stop(); emit error(int(errorCode), errorString); }
so it seems to be emitting a signal to a wrong function definition.
Update:
I was able to step into the "emit" call and ended up here:
void QPlatformAudioDecoder::error(int error, const QString &errorString) { if (error == m_error && errorString == m_errorString) return; m_error = QAudioDecoder::Error(error); m_errorString = errorString; setIsDecoding(false); emit q->error(m_error); }
and it seems that "q" is a "queued" signal handler, not a direct one, so I can't step through that to the slot.
But I can assure you, my correctly-connected error slot is never invoked.
Note that this happens when trying to play an mp3 file, which really should work in any case, so perhaps that's yet another bug?