开发者

Windows Multimedia API winmm.dll library too slow

i am using Windows Multimedia API winmm.dll library to play MP3 files and when i load a song it takes kins of 3-5 seconds to open and start the song . I wish to ma开发者_JS百科ke a music app and that requires fast loading. Any ideas how i can improve the code ?

Here is the code i've used : http://www.geekpedia.com/code111_Play-MP3-Files-Using-Csharp.html

Regards, Alexandru Badescu


I am not an audio/video expert but from my experience it's very limited in managed code. You either have to get into the win32 API or go the DirectX route. DirectSound cannot play mp3 files natively. You will need to use DirectX if you don't like the win32 PInvokes response times.

You will need the DirectX SDK and then import the audio video playback namespace.

Imports Microsoft.DirectX.AudioVideoPlayback

You can then use the directx objects to play an mp3 file.


Have you looked at this?

http://www.robburke.net/mle/mp3sharp/

He claims to have a sample, using DirectSound where he plays the MP3.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜