Lines Matching refs:_file
161 if self._file:
165 self._file = file
212 return self._file
260 data = self._file.read()
262 data = self._file.read(nframes * self._framesize)
273 self._file.seek(self._data_pos)
284 self._file.seek(self._data_pos + pos * self._framesize)
288 self._file = None
299 if self._file:
303 self._file = file
398 self._file.write(data)
409 if self._file:
415 self._file.flush()
417 self._file = None
452 _write_u32(self._file, AUDIO_FILE_MAGIC)
455 _write_u32(self._file, header_size)
461 self._form_length_pos = self._file.tell()
464 _write_u32(self._file, length)
466 _write_u32(self._file, encoding)
467 _write_u32(self._file, self._framerate)
468 _write_u32(self._file, self._nchannels)
469 self._file.write(self._info)
470 self._file.write('\0'*(header_size - len(self._info) - 24))
475 self._file.seek(self._form_length_pos)
476 _write_u32(self._file, self._datawritten)
478 self._file.seek(0, 2)