Skip to content

Commit

Permalink
[#23] Hide the samples generator.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Mar 27, 2021
1 parent bfcc163 commit cf667fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions zx/_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ def __load_input_recording(self, file):
self.set_breakpoint(0x04d4)

# Process frames in order.
self.__playback_player.samples = (
self.__playback_player.get_playback_samples())
sample = None
for sample in self.__playback_player.samples:
break
Expand Down
4 changes: 3 additions & 1 deletion zx/_playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ def __init__(self, machine, file):
assert isinstance(file, RZXFile)
self._recording = file

self.samples = self.__get_playback_samples()

def find_recording_info_chunk(self):
for chunk in self._recording['chunks']:
if chunk['id'] == 'info':
Expand All @@ -29,7 +31,7 @@ def find_recording_info_chunk(self):
def get_chunks(self):
return self._recording['chunks']

def get_playback_samples(self):
def __get_playback_samples(self):
# TODO: Have a class describing playback state.
self.playback_frame_count = 0
self.playback_chunk = 0
Expand Down

0 comments on commit cf667fc

Please sign in to comment.