Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-934

QAudioBuffer.read().data() returns shiboken2.libshiboken.VoidPtr

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.1
    • Fix Version/s: 5.12.2
    • Component/s: PySide, Shiboken
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      45e3c96a8075d210b70eabdb2ef9c3f7f1ca17af (pyside/pyside-setup/5.12)

      Description

      So over at Papagayo-NG we want to switch our audio handling from pydub and sounddevice to QT.

      This works mostly already.

      Problem is that we need the raw audio data to create our waveform.

      So, there doesn't seem to be a nice way like with pydub to work with the audio data.

      After researching a bit QAudioDecoder seems to be the way to go.

      Using that we run through the file and receive a bunch of QAudioBuffer Objects.

      QAudioBuffer has data() and constData() available to get to it's data according to the documentation but that returns the mentioned shiboken2.libshiboken.VoidPtr

      That is not really usable and I'm pretty sure that a list of the samples would make more sense as a return value for that.

      I've tried getting to the underlying data using cffi but I'm pretty sure that what I get using that is not the correct data.

      You can see my experiments here in this file: https://github.com/steveway/papagayo-ng/blob/master/SoundPlayerQT.py

        Attachments

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

          Activity

            People

            • Assignee:
              crmaurei Cristian Maureira-Fredes
              Reporter:
              steveway Stefan Murawski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes