CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: MP3 file coding

  1. #1
    Join Date
    Mar 2005
    Posts
    17

    Exclamation MP3 file coding

    Hi,

    I have a project to do for college, and they want me to experiment with audio conversion.

    I'm not allowed to use any components to convert the WAV to MP3 automatically, I have to do it myself through code. Also, I need to describe the file architecture of standard PCM wave files and how compression works.

    What kind of encoding does MP3 use and how do I implement it programatically?
    Could you also give me some pointers on PCM wave files and compression, it'd be very useful!

    Thanks in advance,

    Burningmace

  2. #2
    Join Date
    Dec 2001
    Posts
    6,332

    Re: MP3 file coding

    Are you saying they expect you to write your own mp3 codec? Using vb? Or are you free to use your own choice of format? Does the term "component" imply codecs too, or just vb implementations? I can't believe they'd expect you to write a codec in vb, even if you had the time.

    Given that available codecs are allowed, I'd use the LAME codec. You'll find examples on PlanetSourceCode.com, though you'll have to avoid the ones requiring a common dll being used for such. There are examples involving wave files too, which should be helpful.

    There is plenty of information available on PCM wave format. Just google your way to whatever you need.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  3. #3
    Join Date
    Mar 2005
    Posts
    17

    Re: MP3 file coding

    I assume they want me to load a small WAV file into a byte array and process it.

    It doesn't have to be MP3 though, I just thought that would be easy as it is very common. After a bit of research, I've decided to move away from MP3 and turn to changing the quality of the WAV.
    How can I change the sample rate from say 44.1KHz to 8KHz, without affecting the speed?
    I've asked and I can use any API which comes as standard with Windows. No audio processing controls allowed.

    Sorry to change my mind,

    Burningmace

  4. #4
    Join Date
    Dec 2001
    Posts
    6,332

    Re: MP3 file coding

    Well, if anything that comes with windows is allowed, then I believe DirectX would help you out. As I recall, it has the built-in capability to do all sorts of processing, including time compression/expansion (changing the duration without changing pitch). I'd guess the kind of resampling you mention is also something it can do, though I've not researched it.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  5. #5
    Join Date
    Mar 2005
    Posts
    17

    Re: MP3 file coding

    Sorry, should have been more specific...
    I can't use things like DirectX and WMP to edit the file.
    I can only use APIs like waveOutOpen and waveOutWrite to do it.
    In other words, I'm only allowed to use stuff that's automatically there when I start a Standard EXE project in VB6, and APIs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured