1
0
mirror of https://github.com/weiju/amiga-stuff synced 2025-12-08 14:58:33 +00:00

png2image and wav2ami migrated to python3

This commit is contained in:
Wei-ju Wu
2016-09-20 08:38:40 -07:00
parent 8fc0522326
commit c45b7944cb
2 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import argparse
import wave
import struct
@ -13,12 +13,12 @@ if __name__ == '__main__':
parser.add_argument('wavfile')
args = parser.parse_args()
print args.wavfile
print(args.wavfile)
infile = wave.open(args.wavfile)
print "# channels: ", infile.getnchannels()
print "sample width: ", infile.getsampwidth()
print "frame rate: ", infile.getframerate()
print "# frames: ", infile.getnframes()
print("# channels: ", infile.getnchannels())
print("sample width: ", infile.getsampwidth())
print("frame rate: ", infile.getframerate())
print("# frames: ", infile.getnframes())
num_frames = infile.getnframes()
data = [conv_amplitude(infile.readframes(1)) for _ in range(num_frames)]
#print data