mercredi 24 décembre 2014

windows winmm.dll use mciSendString to play mp3

when I use the ctypes(a module in python) to load winmm.dll,I call the mciSendString function to play mp3 file.But it failed.

And I have search documents in the MSDN Library.Now I can use the function to play a wav file. code like this:

open waveaudio!"G:\test\music\play.wav" alias myaudio It works.

But when I want to play a mp3 file.I can not find a corresponding device to use.

I have tried to use MPEGVideo,

open MPEGVideo!"G:\test\music\play.mp3" alias myaudio2

or this:

open "G:\test\music\play.mp3" type MPEGVideo alias myaudio2

but on my computer it does not work. The mci could not be initlized.

It shows this result

Is there a suitable device to decode mp3-file in the winmm.dll.If not , is there a another way?


Aucun commentaire:

Enregistrer un commentaire