summaryrefslogtreecommitdiff
path: root/Mac/Demo/sound/playaiff.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Demo/sound/playaiff.py')
-rw-r--r--Mac/Demo/sound/playaiff.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Mac/Demo/sound/playaiff.py b/Mac/Demo/sound/playaiff.py
index 8237895250..087f7c9c9f 100644
--- a/Mac/Demo/sound/playaiff.py
+++ b/Mac/Demo/sound/playaiff.py
@@ -5,16 +5,16 @@ import aifc, audioop
fn = 'f:just samples:2ndbeat.aif'
af = aifc.open(fn, 'r')
-print af.getparams()
-print 'nframes =', af.getnframes()
-print 'nchannels =', af.getnchannels()
-print 'framerate =', af.getframerate()
+print(af.getparams())
+print('nframes =', af.getnframes())
+print('nchannels =', af.getnchannels())
+print('framerate =', af.getframerate())
nframes = min(af.getnframes(), 100000)
frames = af.readframes(nframes)
-print 'len(frames) =', len(frames)
-print repr(frames[:100])
+print('len(frames) =', len(frames))
+print(repr(frames[:100]))
frames = audioop.add(frames, '\x80'*len(frames), 1)
-print repr(frames[:100])
+print(repr(frames[:100]))
import struct
@@ -27,7 +27,7 @@ header1 = struct.pack('llhhllbbl',
0xFF,
60,
nframes)
-print repr(header1)
+print(repr(header1))
header2 = struct.pack('llhlll', 0, 0, 0, 0, 0, 0)
header3 = struct.pack('hhlll',
af.getsampwidth()*8,
@@ -35,7 +35,7 @@ header3 = struct.pack('hhlll',
0,
0,
0)
-print repr(header3)
+print(repr(header3))
header = header1 + header2 + header3
buffer = header + frames