class_docstr: An AIFF, WAV, or Au file that can be read by the Python standard
  library modules ``wave``, ``aifc``, and ``sunau``.
class_docstr_tok: ["An","AIFF",",","WAV",",","or","Au","file","that","can","be","read","by","the","Python","standard","library","modules","``","wave","``",",","``","aifc","``",",","and","``","sunau","``","."]
docstr: Generates blocks of PCM data found in the file.
docstr_tok: ["Generates","blocks","of","PCM","data","found","in","the","file","."]
code: def read_data(self, block_samples=1024):
      """Generates blocks of PCM data found in the file."""
      old_width = self._file.getsampwidth()
  
      while True:
          data = self._file.readframes(block_samples)
          if not data:
              break
  
          # Make sure we have the desired bitdepth and endianness.
          data = audioop.lin2lin(data, old_width, TARGET_WIDTH)
          if (
              self._needs_byteswap
              and self._file.getcomptype() != "sowt"
          ):
              # Big-endian data. Swap endianness.
              data = byteswap(data)
          yield data
  
imports: import aifc
  import audioop
  import struct
  import sunau
  import wave
  from .exceptions import DecodeError
  from .base import AudioFile
label_desc: Use image node_id 7 for calling the RawAudioFile obj's underlying member method code with example usage: obj.read_data(block_samples) without return types