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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.12.2
    • 5.12.1, 6.2.1
    • PySide, Shiboken
    • None
    • All
    • 6.5.0

    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

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              steveway Stefan Murawski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes