How To Play a MP3

From IronPython Cookbook

Revision as of 16:05, 16 June 2007 by MichaelFoord (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

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()

Microsoft documentation:


Back to Contents.

TOOLBOX
LANGUAGES