• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

C# Audio Playback Question

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Midnight Dream

OSPF Loving Member
Joined
Mar 17, 2004
Location
Lawrenceville, Georgia
Ok, i've settled on a project, but am going back and forth trying to figure out how to even start it. Wanting to do some sort of a small scale audio player with, at first, just MP3 support. However, looking into what I can find, I come up with...nothing. I'm not sure where to start, except that I know that I do not want to use the WMP COM control. I figure that i'm going to be looking at some libraries here which already have MP3 support, but even then the only thing I could find was this, which I am unsure of if it is what I need, as their sample was of media files such as AVI, WMV, all movies.

Thoughts?
 
Midnight Dream said:
Ok, i've settled on a project, but am going back and forth trying to figure out how to even start it. Wanting to do some sort of a small scale audio player with, at first, just MP3 support. However, looking into what I can find, I come up with...nothing. I'm not sure where to start, except that I know that I do not want to use the WMP COM control. I figure that i'm going to be looking at some libraries here which already have MP3 support, but even then the only thing I could find was this, which I am unsure of if it is what I need, as their sample was of media files such as AVI, WMV, all movies.

Thoughts?

Some of the file formats might be protected and not free to use. AFAIK We can't make an mp3 encoder/decoder without some type of permission.

As for sound, you can use OpenAL library.
 
What version of C# are you dealing with? if it is 2005 then you should be able to use the System.Media.Soundplayer class for sounds and the windows mediaplayer object for video or sound. You would need to reference the mediaplayer object though. Anything you can view/hear in Mediaplayer you will be able to hear/view in your application if you go this route. Also, should you want to dabble in the WPF arts like I love to, you can try out the MediaElement object. This uses mediaplayer in the background while maintaining just a simple control on the form.

I love WPF.
 
Tacoman667 said:
What version of C# are you dealing with? if it is 2005 then you should be able to use the System.Media.Soundplayer class for sounds and the windows mediaplayer object for video or sound. You would need to reference the mediaplayer object though. Anything you can view/hear in Mediaplayer you will be able to hear/view in your application if you go this route. Also, should you want to dabble in the WPF arts like I love to, you can try out the MediaElement object. This uses mediaplayer in the background while maintaining just a simple control on the form.

I love WPF.

I don't want to use the Windows Media Player control, as I am wanting to branch this out and make it cross platform via mono. My initial research just came up with DirectShow.Net, which I know would not be realistic for cross platform, but then again it was just my initial research.

I will look into OpenAL, ShadowPho. Do you know its capabilities of multimedia audio playback?
 
If you are using C#, then your users will still need .NET and Soundplayer will work for audio. You will definutely need to go with a 3rd party media player for video playback in your application.
 
Tacoman667 said:
If you are using C#, then your users will still need .NET and Soundplayer will work for audio. You will definutely need to go with a 3rd party media player for video playback in your application.

It's a given that they will need .NET, as C# is an implementation of .NET, but I do not want to use DirectShow.Net, as it is a third party addition to .NET. Mono and GTK# will handle the rest, as well as OpenAL.
 
lol, don't argue with midnight dream, he knows his stuff hehe...

good luck with your audio play, keep us posted sounds interesting :)
 
Back