How To Play a MP3

From IronPython Cookbook

(Difference between revisions)
m
 
(One intermediate revision not shown)
Line 12: Line 12:
mp3.Play()
mp3.Play()
</pre>
</pre>
 +
 +
Microsoft documentation:
 +
* [http://msdn2.microsoft.com/en-us/library/bb324224.aspx Audio Class]
 +
* [http://msdn2.microsoft.com/en-us/library/bb324548.aspx Classes in AudioVideoPlayback Namespace] - this includes classes for video playing
 +
* [http://msdn2.microsoft.com/en-us/library/bb318762.aspx AudioVideoPlayback Namespace]
 +
 +
 +
Back to [[Contents]].

Current revision as of 16:05, 16 June 2007

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