How To Play a MP3

From IronPython Cookbook

Revision as of 19:51, 14 June 2007 by Daftspaniel (Talk | contribs)

This code requires a managed version of DirectX which can be downloaded here.

import clr

clr.AddReference('Microsoft.DirectX.AudioVideoPlayback')

from Microsoft.DirectX import AudioVideoPlayback

mp3 = AudioVideoPlayback.Audio("C:\\myreallyfunky.mp3")

mp3.Play()
TOOLBOX
LANGUAGES