How To Play a MP3

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:
 * Audio Class
 * Classes in AudioVideoPlayback Namespace - this includes classes for video playing
 * AudioVideoPlayback Namespace

Back to Contents.