Search Forum
(57250 Postings)
Search Site/Articles

Archived Articles
712 Articles

C# Books
C# Consultants
What Is C#?
Download Compiler
Code Archive
Archived Articles
Advertise
Contribute
C# Jobs
Beginners Tutorial
C# Contractors
C# Consulting
Links
C# Manual
Contact Us
Legal

GoDiagram for .NET from Northwoods Software www.nwoods.com


              
Printable Version

C# / MP3
By Kenton Brown

Here is an example C# program that plays mp3, using lame.exe converts wav to mp3, records and plays wav files using MCI.

Download Source

You will need lame.exe.
Get it here: http://www.mp3dev.org/mp3/
put it in the c:\ directory to use my defaults

I did assemble this program,but I got the info from various sources. I decided to assemble this example after spending several hours searching for this type of information for C#.
Remember that 'int, uint' in C# is the same length (32 bits, 4 bytes) as a 'long' in visual basic, and DWORD or UINT in C++
Credit given to C# HELP where I found the mp3 example.
Credit given to all the other places I found the winmm.lib info.
Visual C++ example http:www.cs.binghamton.edu/~reckert/360/11.html
http:support.microsoft.com/default.aspx?scid=kb;EN-US;q152180

The end of the file has the lame.exe help file and info on converting types between languages. Put the lame.exe in same directory as your test wave file to convert wav to mp3
First confirm your mic is working
Code your project directory
Record a wave file

To use this as is just put the lame.exe program in the c:\ directory and record a wave don't forget to hit enter to stop the recording
lame.exe is at http://www.webattack.com/get/lame.shtml

THIS CODE IS FREE. ALL CODE EXAMPLES I USED WERE ALSO FREE.