Fixed example
diff --git a/Mac/Lib/Audio_mac.py b/Mac/Lib/Audio_mac.py
index 373f16a..fef7d6e 100644
--- a/Mac/Lib/Audio_mac.py
+++ b/Mac/Lib/Audio_mac.py
@@ -89,8 +89,12 @@
import audioop
return audioop.ulaw2lin(data, 2)
-def test(fn = 'f:just samples:just.aif'):
+def test():
import aifc
+ import macfs
+ fss, ok = macfs.PromptGetFile("Select an AIFF soundfile", "AIFF")
+ if not ok: return
+ fn = fss.as_pathname()
af = aifc.open(fn, 'r')
print af.getparams()
p = Play_Audio_mac()
@@ -102,6 +106,7 @@
data = af.readframes(BUFSIZ)
if not data: break
p.writeframes(data)
+ print 'wrote', len(data), 'space', p.getfillable()
p.wait()
if __name__ == '__main__':