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

QAudioBuffer: the data() and constData() methods are missing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 6.2.9, 6.3
    • PySide
    • None
    • Windows
    • 41de0c4787 (pyside/pyside-setup/dev) 7b1c731596 (pyside/pyside-setup/6.3) 7b1c731596 (pyside/pyside-setup/wip/6.3_pypy) 7b1c731596 (pyside/tqtc-pyside-setup/6.3) 41de0c4787 (pyside/tqtc-pyside-setup/dev) 7b1c731596 (pyside/tqtc-pyside-setup/wip/6.3_pypy)

    Description

      The document says:

      > To access the data stored inside the buffer, use the data() or constData() methods.

       But the data() and constData() methods are missing from PySide6 (Not Qt6):

      dir(buffer):
      00:'__class__'
      01:'__copy__'
      02:'__delattr__'
      03:'__dict__'
      04:'__dir__'
      05:'__doc__'
      06:'__eq__'
      07:'__format__'
      08:'__ge__'
      09:'__getattribute__'
      10:'__gt__'
      11:'__hash__'
      12:'__init__'
      13:'__init_subclass__'
      14:'__le__'
      15:'__lt__'
      16:'__module__'
      17:'__ne__'
      18:'__new__'
      19:'__reduce__'
      20:'__reduce_ex__'
      21:'__repr__'
      22:'__setattr__'
      23:'__sizeof__'
      24:'__str__'
      25:'__subclasshook__'
      26:'byteCount'
      27:'duration'
      28:'format'
      29:'frameCount'
      30:'isValid'
      31:'sampleCount'
      32:'startTime'
      
      template <typename T> const T *QAudioBuffer::data() const
      template <typename T> T *QAudioBuffer::data()
      

      Returns a pointer to this buffer's data. You can modify the data through the returned pointer.
      Since QAudioBuffer objects are explicitly shared, you should usually call detach() before modifying the data through this function.
      There is also a templatized version of data() allows you to retrieve a specific type of pointer to the data. Note that there is no checking done on the format of the audio buffer - this is simply a convenience function.

      Attachments

        Issue Links

          For Gerrit Dashboard: PYSIDE-1947
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              honghe Honhe Wu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes