MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / setpos

Method setpos

tools/python-3.11.9-amd64/Lib/sunau.py:297–303  ·  view source on GitHub ↗
(self, pos)

Source from the content-addressed store, hash-verified

295 return self._soundpos
296
297 def setpos(self, pos):
298 if pos < 0 or pos > self.getnframes():
299 raise Error('position not in range')
300 if self._data_pos is None:
301 raise OSError('cannot seek')
302 self._file.seek(self._data_pos + pos * self._framesize)
303 self._soundpos = pos
304
305 def close(self):
306 file = self._file

Callers 5

writeMethod · 0.45
startFunction · 0.45
__init__Method · 0.45
stepMethod · 0.45
mainFunction · 0.45

Calls 3

getnframesMethod · 0.95
ErrorClass · 0.70
seekMethod · 0.45

Tested by

no test coverage detected