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

Linux QAudioOutput playback stuttering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.6.3
    • 4.6.1, 4.6.2
    • Multimedia
    • None
    • Linux 2.6.24.6
      ALSA 1.0.19
      PowerPC (MPC5121e) connected via I2S to TLV32DAIC23B Codec

    Description

      Playing an audio clip using QAudioOutput on Linux (i.e. through ALSA) stutters on some hardware/software configurations. Playing the same audio clip on the same system using "aplay" works correctly.

      The problem appears to be that the buffer size and period size are being set to equal values – the buffer size should be larger than the period size:

      # cat /proc/asound/card0/pcm0p/sub0/hw_params
      access: MMAP_INTERLEAVED
      format: S16_BE
      subformat: STD
      channels: 2
      rate: 11025 (11025/1)
      period_size: 4096
      buffer_size: 4096
      tick_time: 4000
      

      I've attached a patch to the ALSA implementation of QAudioOutput which produces correct results for me.

      I've also attached source code for a test application that demonstrates the bug on my PowerPC machine. This same code works correctly without any change to Qt on my i386 desktop.

      Attachments

        1. audio-test.tar.gz
          15 kB
        2. qaudiooutput_alsa.cpp.patch
          1 kB
        3. QTBUG-8339.patch
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            korbatit Kurt Korbatits (closed Nokia identity) (Inactive)
            sschulteis Steven Schulteis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes