tags:

views:

31

answers:

2

Hello!

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 make 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

A: 

Have you looked at this?

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

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

Dean Thomas
A: 

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.

Justin