Playing Music

  • Thread starter Thread starter Donald Smith
  • Start date Start date
D

Donald Smith

Hey,

What's the best component to use to play MP3's in my own program? I've used
the Windows Media Player one, but is there a better one? Thanks.

-Don
 
Don't know how about C# but there are some API's that let You do that.
Try to google FMOD, BASS. I think FMOD does have the possibility to
play mp3's.
You can also try to write Your own mp3 decoder,anyway:) (not a trivial
task.)
If somebody knows any other methods - please post here. I'd like to
know too.
Maybe new DirectX (DirectNext) has that feature?
 
Hi,

There is nothing in the framework for this, you would have to either
P/Invoke PlaySound API call or use a third party component.

cheers
 
There is the Audio object in the DirectX.AudioViedoPlayback.dll, that you
can use.
However there is an article here:
http://www.codeproject.com/cs/media/DirectX9_media_playback.asp
That recommends you don't use it, it recommends you use MediaPlayer instead.

Personally I dislike MediaPlayer more than the DirectX object (although,
i'll admit, it has been a bit of bastard).
I found that media player was a bit inconsistent with it's event firing and
I think the object "smells" a bit which are the reasons why I decided not to
use it (I don't know if other people have had greater success though... so I
could well be wrong.).

There are methods that play .wav files in the API, although I guess this
means you'd have to convert from .mp3 to .wav if you want to play .mp3s,
which is possibly quite intensive.

If it's a simple app then i'd recommend using the DirectX object, anything
larger and i'd recommend you do further research and come to your own
conclusions about which is the better object to use.

Jax
 
Back
Top