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

Unsuccessful QSound::play (loop -1) hangs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.7.2
    • 4.6.3, 4.7.1
    • Multimedia
    • None
    • e1cde7c26b4923299b78e6165416788fbf8cd30e

      When using internal VoipAudioService together with QSound the play can return an Error and therefor hang the framework.

      I looked at the source for 4.7.1 and found following:

      In QSound, if setLoops is set with -1 as argument d->looptotal will be set to -1 at QSound::play

      Then in QAuBucketS60, if MapcPlayComplete is called with an error playCompleted will be called and following code will run

      else {
      // We don't have a way to inform about errors -> just decrement loops
      // in order that QSound::isFinished will return true;
      while (decLoop(sound)) {}
      if (staticPlayingSounds.removeAll(sound))
      delete sound;
      }

      decLoop will return s->d_func()->looprem which I believe is still -1 and the while-case will loop until the platform close the application.

      I have tested it on 4.6.3 but the code analysis is from 4.7.1 source-release.

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

            hawcroft Derick Hawcroft (closed Nokia identity) (Inactive)
            antonsson Henrik Antonsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes