class_docstr: Reads raw audio data from any audio file that Gstreamer
  knows how to decode.
  
      >>> with GstAudioFile('something.mp3') as f:
      >>>     print f.samplerate
      >>>     print f.channels
      >>>     print f.duration
      >>>     for block in f:
      >>>         do_something(block)
  
  Iterating the object yields blocks of 16-bit PCM data. Three
  pieces of stream information are also available: samplerate (in Hz),
  number of channels, and duration (in seconds).
  
  It's very important that the client call close() when it's done
  with the object. Otherwise, the program is likely to hang on exit.
  Alternatively, of course, one can just use the file as a context
  manager, as shown above.
class_docstr_tok: ["Reads","raw","audio","data","from","any","audio","file","that","Gstreamer","knows","how","to","decode",".",">",">",">","with","GstAudioFile","(","'something.mp3","'",")","as","f",":",">",">",">","print","f.samplerate",">",">",">","print","f.channels",">",">",">","print","f.duration",">",">",">","for","block","in","f",":",">",">",">","do_something","(","block",")","Iterating","the","object","yields","blocks","of","16-bit","PCM","data",".","Three","pieces","of","stream","information","are","also","available",":","samplerate","(","in","Hz",")",",","number","of","channels",",","and","duration","(","in","seconds",")",".","It","'s","very","important","that","the","client","call","close","(",")","when","it","'s","done","with","the","object",".","Otherwise",",","the","program","is","likely","to","hang","on","exit",".","Alternatively",",","of","course",",","one","can","just","use","the","file","as","a","context","manager",",","as","shown","above","."]
docstr: The callback for appsink's "new-sample" signal.
          
code: def _new_sample(self, sink):
      """The callback for appsink's "new-sample" signal."""
      if self.running:
          # New data is available from the pipeline! Dump it into our
          # queue (or possibly block if we're full).
          buf = sink.emit("pull-sample").get_buffer()
  
          # We can't use Gst.Buffer.extract() to read the data as it crashes
          # when called through PyGObject. We also can't use
          # Gst.Buffer.extract_dup() because we have no way in Python to free
          # the memory that it returns. Instead we get access to the actual
          # data via Gst.Memory.map().
          mem = buf.get_all_memory()
          success, info = mem.map(Gst.MapFlags.READ)
          if success:
              if isinstance(info.data, memoryview):
                  # We need to copy the data as the memoryview is released
                  # when we call mem.unmap()
                  data = bytes(info.data)
              else:
                  # GStreamer Python bindings <= 1.16 return a copy of the
                  # data as bytes()
                  data = info.data
              mem.unmap(info)
              self.queue.put(data)
          else:
              raise GStreamerError(
                  "Unable to map buffer memory while reading the file."
              )
      return Gst.FlowReturn.OK
  
imports: import gi
  from gi.repository import GLib, Gst
  import sys
  import threading
  import os
  import queue
  from urllib.parse import quote
  from .exceptions import DecodeError
  from .base import AudioFile
label_desc: Use image node_id 5 for calling the GstAudioFile obj's underlying member method code with example usage: obj._new_sample(sink) and returns: Gst