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

Audio playback not resuming after device locked/unlocked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7
    • Multimedia
    • iOS/tvOS/watchOS

    Description

      This bug report is a follow-up for QTBUG-114674. The problem can be reproduced using our example application - 'audiooutput'. When the app starts you can hear the sound (some noise generated by our custom IO device attached to audio sink). Then, if the iOS device running the app is locked, the audio stops. Unlocking device does not resume audio playback (technically audio render callback we have never gets called again from AudioToolbox framework). And the moment the device is locked, debug output in XCode is filled with a lot of warning messages (see the quote below). We managed to workaround the issue by increasing the size of our 'CoreAudio ring buffer', see the patch linked to QTBUG-114674 (fixed using a rather arbitrary multiplier for the current size were using previously) - this fixed the problem and there are no more warnings in the debug log.

      It probably makes sense to better understand what's happening, since it seems like a regression in AudioToolkit (started from iOS version 16), thus this bug report.

      Warnings from the XCode's debug log:

      Input data proc returned inconsistent 941 packets for 3752 bytes; at 4 bytes per packet, that is actually 938 packets
      Input data proc returned inconsistent 3 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 912 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 912 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 912 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 32 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      QMainWindowLayout(0x148829400, name = "_layout") is laying out QWidget(0x303f2d560) outside of the contents rect of AudioTest(0x16fc63e10)
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 941 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 1024 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      The cached device pixel ratio value was stale on window expose. Please file a QTBUG which explains how to reproduce.
      Errors found! Invalidating cache...
      Errors found! Invalidating cache...
      Input data proc returned inconsistent 3763 packets for 6744 bytes; at 4 bytes per packet, that is actually 1686 packets
      Input data proc returned inconsistent 2077 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 2045 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 2045 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 1870 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 3764 packets for 11280 bytes; at 4 bytes per packet, that is actually 2820 packets
      Input data proc returned inconsistent 944 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 912 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      Input data proc returned inconsistent 912 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 3104 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 3763 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 3763 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 3763 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 3763 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      Input data proc returned inconsistent 3763 packets for 0 bytes; at 4 bytes per packet, that is actually 0 packets
      ProduceOutput: produced only 0 of 4096 requested packets PCMConverter2 0x300644a50
      Input: 2 ch, 44100 Hz, Int16, interleaved
      Output: 2 ch, 44100 Hz, Float32, interleaved
      SampleRateConverter 0x147e09280
      Input: 2 ch, 44100 Hz, Float32, interleaved
      Output: 2 ch, 48000 Hz, Float32, deinterleaved
      Algorithm 1852797549, quality 64, Resampler2Wrapper @ 0x30126ada0
      AURemoteIO.cpp:1702 AUIOClient_StartIO failed (561015905)

      Attachments

        Issue Links

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

          Activity

            People

              qtmultimediateam Qt Multimedia Team
              tpochep Timur Pocheptsov
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes