Theme by nostrich, altered by Tyches.
Text
This is for Mac OS X, adapt to your needs:
import mad, ao, sys
mf = mad.MadFile(sys.argv[1])
dev = ao.AudioDevice('macosx', bits=32, rate=mf.samplerate(), channels=2)
buf = mf.read()
while buf != None:
dev.play(buf, len(buf))
buf = mf.read()