Re: Dragon 32 Homecomputer Kassetten in ASCII umwandeln...
Verfasst: Dienstag 20. August 2013, 08:34
OK, nochmal genauer angesehen.
Wenn ich das richtig sehe macht:
das selbe wie:
Und das:
das selbe wie:
Sehe ich das richtig?
btw. bei typecode = {1: 'b', 2: 'h', 4: 'i'} muß IMHO 4: 'l' lauten, oder? Wäre ein 32Bit wave file.
EDIT: Ich hab das mal eingepflegt: https://github.com/jedie/python-code-sn ... acd#L0R182
Wenn ich das richtig sehe macht:
Code: Alles auswählen
for frames in iter(functools.partial(wavefile.readframes, WAVE_READ_SIZE), ''):
Code: Alles auswählen
while True:
frames = wavefile.readframes(WAVE_READ_SIZE)
if not frames:
break
Code: Alles auswählen
for value in array.array(typecode, frames):
Code: Alles auswählen
frame_count = len(frames) / samplewidth
frames = struct.unpack(struct_unpack_str % frame_count, frames)
for frame in frames:
btw. bei typecode = {1: 'b', 2: 'h', 4: 'i'} muß IMHO 4: 'l' lauten, oder? Wäre ein 32Bit wave file.
EDIT: Ich hab das mal eingepflegt: https://github.com/jedie/python-code-sn ... acd#L0R182