class_docstr: An audio file decoded by the ffmpeg command-line utility.
class_docstr_tok: ["An","audio","file","decoded","by","the","ffmpeg","command-line","utility","."]
docstr: Close the ffmpeg process used to perform the decoding.
docstr_tok: ["Close","the","ffmpeg","process","used","to","perform","the","decoding","."]
code: def close(self):
      """Close the ffmpeg process used to perform the decoding."""
      if hasattr(self, "proc"):
          # First check the process's execution status before attempting to
          # kill it. This fixes an issue on Windows Subsystem for Linux where
          # ffmpeg closes normally on its own, but never updates
          # `returncode`.
          self.proc.poll()
  
          # Kill the process if it is still running.
          if self.proc.returncode is None:
              self.proc.kill()
              self.proc.wait()
  
          # Wait for the stream-reading threads to exit. (They need to
          # stop reading before we can close the streams.)
          if hasattr(self, "stderr_reader"):
              self.stderr_reader.join()
          if hasattr(self, "stdout_reader"):
              self.stdout_reader.join()
  
          # Close the stdout and stderr streams that were opened by Popen,
          # which should occur regardless of if the process terminated
          # cleanly.
          self.proc.stdout.close()
          self.proc.stderr.close()
  
imports: import queue
  import re
  import subprocess
  import sys
  import threading
  import time
  from io import DEFAULT_BUFFER_SIZE
  from .exceptions import DecodeError
  from .base import AudioFile
label_desc: Use image node_id 5 for calling the FFmpegAudioFile obj's underlying member method code with example usage: obj.close() without return types