[python-win32] Audio file playback solution

Todd Fiske toddfiske at gmail.com
Mon Apr 28 02:25:53 CEST 2014


Hi Jacob,

The mp3play module is just a wrapper around the Windows Media Control
Interface [1]. I use it in a basic (wonky) AudioPlayer module I wrote that
combines it with a Tkinter frame. If you dig into it's windows.py module,
you'll see that it works by sending command strings with the mciSendStringA
Windows API function. My brief reading of the manual for the setaudio
command [2] says that it supports separate values for left and right
channels. It would take some experimentation but you could work out panning
by controlling the left and right volume factors relative to each other.

Todd

[1] MCI (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd757151%28v=vs.85%29.aspx

[2] setaudio command (Windows)
http://msdn.microsoft.com/en-us/library/windows/desktop/dd798662%28v=vs.85%29.aspx




On Sun, Apr 27, 2014 at 3:29 PM, Jacob Kruger <jacob at blindza.co.za> wrote:

>  Following module does actually offer exactly what wanted - on windows
> platform anyway - handles MP3, WMA and WAV file formats, and I got it setup
> under python 2.7, and it also compiles quite happily, along with wxPython
> GUI, using cx_freeze - doesn't offer stereo panning, but, that's minor:
> https://code.google.com/p/mp3play/
>
> Jacob Kruger
> Blind Biker
> Skype: BlindZA
> "Roger Wilco wants to welcome you...to the space janitor's closet..."
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> https://mail.python.org/mailman/listinfo/python-win32
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20140427/9dc89764/attachment.html>


More information about the python-win32 mailing list