How To Play a MP3

From IronPython Cookbook

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