Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95352

QAudioDecoder::error signal is not called

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.2.0 Beta1
    • Multimedia
    • None
    • macOS

    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?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dorisverria Doris Verria
            davecotter David M. Cotter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes