def _get_state(self): sample = self.current_sample position = self.samples.index(sample) if sample in self.samples else None return sound_state(sample, position)
def _get_state(self): chunk = self.current_chunk position = self.chunks.index(chunk) if chunk in self.chunks else None return sound_state(chunk, position)