class_docstr: Given a waveform, encode on-demand and return bytes
class_docstr_tok: ["Given","a","waveform",",","encode","on-demand","and","return","bytes"]
code: def read(self, n):
      while not self.buffer._buffer and self.i_iter >= 0:
          self.writer.write_audio_chunk(
              0, self.src[self.i_iter : self.i_iter + self.fpc]
          )
          self.i_iter += self.fpc
          if self.i_iter >= self.src.size(0):
              self.writer.flush()
              self.writer.close()
              self.i_iter = -1
      return self.buffer.pop(n)
  
imports: import io
  from typing import Iterator, List, Optional
  import torch
  from torch import Tensor
  from torio.io._streaming_media_decoder import _get_afilter_desc, StreamingMediaDecoder
  from torio.io._streaming_media_encoder import CodecConfig, StreamingMediaEncoder
label_desc: Use image node_id 2 for calling the _AudioStreamingEncoder obj's underlying member method code with example usage: obj.read(n) and returns: self