Lines Matching refs:_file
169 if self._file:
179 self._file = file
225 return self._file
273 data = self._file.read()
275 data = self._file.read(nframes * self._framesize)
286 self._file.seek(self._data_pos)
297 self._file.seek(self._data_pos + pos * self._framesize)
301 file = self._file
303 self._file = None
319 if self._file:
321 self._file = None
330 self._file = file
427 self._file.write(data)
438 if self._file:
444 self._file.flush()
446 file = self._file
447 self._file = None
487 _write_u32(self._file, AUDIO_FILE_MAGIC)
490 _write_u32(self._file, header_size)
496 self._form_length_pos = self._file.tell()
499 _write_u32(self._file, length)
501 _write_u32(self._file, encoding)
502 _write_u32(self._file, self._framerate)
503 _write_u32(self._file, self._nchannels)
504 self._file.write(self._info)
505 self._file.write(b'\0'*(header_size - len(self._info) - 24))
510 self._file.seek(self._form_length_pos)
511 _write_u32(self._file, self._datawritten)
513 self._file.seek(0, 2)