Mp3

This is a discussion on Mp3 within the C# Programming forums, part of the General Programming Boards category; Hello, It's me again. I am using the .NET IDE. I am wanting to get a little information and insight ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    184

    Mp3

    Hello,
    It's me again.

    I am using the .NET IDE.
    I am wanting to get a little information and insight about the best approach to accomplish something. I am wanting to integrate an MP3 recorder into an application. It needs to work simply. I want to pass a filename for the mp3 file, click the record button, when done click the stop button, then click the save button. No option to rename it. The program will handle the naming of the file. This will be used by a doctor and needs to be as simple as possible. The only user interface that will need to be implemented in the mp3 player/recorder should be only what a tape recorder is capable of. What is the best route to use? Are there some components in .NET that will enable any of this? Is there any API function call that can be used? A utility to integrate? The reason it needs to be MP3 is because of filesize. We will be dealing with up to 15 minute voice recordings. Any starting suggestions would be greatly appreciated.

    Thanks,
    Kendal
    Last edited by gvector1; 06-10-2003 at 03:13 PM.

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    I don't know of any classes that would do this in the Framework class library. The easiest way to do this might be DirectX and DirectSound. The new DX libraries have managed counterparts, so it's quite easy to use it from C#.

    Go to Microsoft MSDN Downloads / DX SDK 9.0a and get it.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    DirectMusic is not yet implemented as Managed, and DirectSound doesn't have MP3 support. DirectShow can playback MP3s, but I doubt it can encode them.

    You should see if you can maybe interface your C# app with the LAME library, but that might bring problems as I think LAME is GPL.
    If that is an issue, you might have to write your own codec or license a commercial one.


    Or use Ogg Vorbis, which is completly patent-free
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    What if I wanted to go the .wma route. It seems to me that I can create a wma file that is very small in size. It seems to me that the Windows Media Encoder will do the job. I have gotten it to record as a wma file but it is recording at 28.8 kbps. The resulting 14 second file is 44.4K in size. I am still searching, and right now I am on the IWMEncAudienceObj Interface path. Any suggestions will be welcomed.

    Thanks,
    Kendal

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I have an aversion against WMA...
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    Why is that??????????????

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Because it's an M$ format of course.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    Then what would you use to record wma format, or what format do you prefer?

  9. #9
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,263
    Originally posted by CornedBee
    Or use Ogg Vorbis, which is completly patent-free
    Yay, someone else uses it too!

    I'll admit that there's little difference in quality (Depending on what you encode, of course) but as you can get hold of all you need to deal with Ogg for nothing it's nice.

  10. #10
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Yep, I only encode with CDex to vorbis anymore.
    I also noticed that they are ~30% smaller at the same "nominal" quality. Don't know how that relates to real-world quality, but I don't really care, my ears aren't that good
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  11. #11
    Registered User
    Join Date
    Jun 2003
    Posts
    4
    Because it's an M$ format of course.
    In that case, Why do you even post in the C# forum?

    Anyways, going the WMA way seems to me to be the best way, although I dont really know how Licenses are handled with wma.
    Mp3 is a bad choice, specially if you implement it in a commercial app, sinceit's going to cost you.. al lot(!)

    In your case (real-use application), I would definatly go the route that has allready been proven to work instead of writing a new encoder urself. That means WMA (providing the EULA lets you)
    Google should be able to provide you with some good material on using wma.. even if it's designed for other languages, you might still get some decent ideas out of it.

    *reads back*
    mm im not really much help Am I? :P ah well, Ill post some links if I come across any good stuff. Good luck!

  12. #12
    Registered User
    Join Date
    Feb 2003
    Posts
    184
    Thanks,

    I appreciate all of the info. I have implemented an wma recorder and a audio player into one app. It is working. I still have some bugs and some more features to add it though. The biggest problem for me is in my other post here. Anyway it is coming along slowly and I appreciate all of the insight.

    Thanks,
    Kendal

  13. #13
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    - In that case, Why do you even post in the C# forum?

    because there are questions to answer.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  14. #14
    Registered User dragunsflame's Avatar
    Join Date
    Jan 2003
    Posts
    8

    Question

    Ummm....let me get this straight. You don't want to use WMA because it is "Micro$oft", yet you are using their .NET platform, their Windows operating system, their Developer IDE, probably their Internet Browser, etc...

    But hey, it's your choice.

    Now for the obligatory _DOWN_WITH_MICRO$OFT_ that accompanies most 1337 h4x0r5' posts. Did you notice my money sign for the 'S' in Microsoft? That means I'm cool.

    I'm so tired of this BS. Sorry for getting a little off topic.

  15. #15
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I don't mind you getting off-topic, but I do mind your post.


    Ummm....let me get this straight. You don't want to use WMA because it is "Micro$oft",
    That's the description for the reason I don't like it:
    It's a proprietary format (of Microsoft). This means that it is bound to windows as MS doesn't write players for Mac and other people can only guess how to read (much less write) the format.
    If the format was proprietary of similar companies I wouldn't like it either - but there are no companies that similar to MS.
    I don't like MP3 very much either, but at least there's an open specification that explains how to read the format.

    yet you are using their .NET platform,
    I expect to be earning my money with programming once I'm done studying - I want to learn as many languages as possible, even if they are MS languages.
    For my own purposes, I use C++ and Java.

    their Windows operating system,
    I do like to game and I need it for learning windows programming. My laptop uses Debian GNU/Linux.

    their Developer IDE,
    Visual Studio is the best app MS ever wrote (although overpriced).

    probably their Internet Browser,
    Not when I can avoid it ( = when I test my pages in IE, when I really need info from a poorly written page, when I don't have any other like here at work)

    etc...
    MS Office at work (again because I don't have anything else), for other purposes AbiWord on my Linux laptop.

    Now for the obligatory _DOWN_WITH_MICRO$OFT_ that accompanies most 1337 h4x0r5' posts.
    I'm not, and there's none.

    Did you notice my money sign for the 'S' in Microsoft? That means I'm cool.
    For me it means that I'm ranting. But whatever floats you boat.





    Hell, why am I even defending myself against you?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. mp3 player
    By cmyoung23 in forum C++ Programming
    Replies: 8
    Last Post: 09-13-2007, 12:11 PM
  2. which Portable mp3 player?
    By Raihana in forum A Brief History of Cprogramming.com
    Replies: 27
    Last Post: 01-09-2004, 06:58 AM
  3. MP3 to WAVE and WAVE to MP3 conversion
    By Blizzarddog in forum C++ Programming
    Replies: 8
    Last Post: 01-01-2004, 07:32 PM
  4. mp3 players vs mp3 cd players
    By Geo-Fry in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-06-2003, 08:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21