|
-
April 17th, 2005, 10:03 AM
#1
How to play MP3 files using C#?
Hi,
There is a question:
How to play MP3 files using C#?
Thanks,
Alex.
-
April 17th, 2005, 03:45 PM
#2
Re: How to play MP3 files using C#?
Well, one way to find out is to do a search on 'MP3' here on CG. :-)
Another way, if you have access to Windows Media Player, is to right-click on your toolbox, select 'Choose Items...' and select the Windows Media Player ActiveX component from the COM Components tab, and use that to play your MP3 file!
A third way is to search your favorite search engine for 'MP3 playback', which in my case would yield (among tons of hits) this hit: http://www.gamedev.net/reference/art...rticle2053.asp. This solution uses the MCI, which is also to be found if you search for MP3 right here at CG: http://www.codeguru.com/forum/showthread.php?t=213820
Now, if you don't want to use an ActiveX component, or MCI, or a third party component/assembly/whatever, then I can only advice you (as the 4th way) to read and playback (somehow) the MP3 file format yourself: http://mpgedit.org/mpgedit/mpeg_format/mpeghdr.htm
Oh, this is so fun , I am currently listening to Debelah Morgan - Dance With Me.mp3 using the 2nd way, without writing a single line of code. (Ofcourse I have the original CD, and decoded the song in MP3 format only for backup purpose :-) (yeah right...)
HTH!
-
April 17th, 2005, 05:37 PM
#3
Re: How to play MP3 files using C#?
the easiest way is,
Code:
System.Diagnostics.Process.Start("[Path].mp3");
it opens the appropriate player which is determined on the local machine(ususally Media Player) and play the music.
-
April 18th, 2005, 06:23 AM
#4
Re: How to play MP3 files using C#?
the problem is: I want to contro volume,
background music etc.
I want to have much more control.
Thanks,
Alex.
-
April 18th, 2005, 08:11 AM
#5
Re: How to play MP3 files using C#?
use windows media player. it's nicely intergrated and you can control it too...
right click toolbox and click customize ... select COM and find media Player and say Ok.
now drag the player from toolbox on to your form and off you go programming...
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
-
April 18th, 2005, 10:35 AM
#6
Re: How to play MP3 files using C#?
Thorry, I forgot say that I wan to play mp3 a Pocket PC
and it must not be a standard player.
In a Desctop PC I can all and much more using C++/MFC.
There is such instrument as DirectShow.
I used it.
But I do not know how you low functions in a Pocket PC.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|