CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    43

    how to play the mp3 data in the buffer?

    My program need to receive the mp3 data in the buffer and play it immeditely,how should i do?
    I don't want to write the buffer to a file and then play it because it may have a long time

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150
    You need a librabry that does this for you. For example BASS, Fmod, DirectShow...
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Apr 2004
    Location
    Colchester, UK
    Posts
    97
    I would go with FMOD. It is very good and easy to use.

  4. #4
    Join Date
    Feb 2004
    Posts
    232
    Alright...It's going to be harder than it seems.

    Go get LAME...I thinks it's mp3dev.org or something...

    Then, call a function to decode the buffer you wanty to play. If you're going to play it from a file, use mmio APIs (which I can guide you through if you are doingg so) Call the waveOut functions and play the decoded buffer. Do this in a loop until the song is over!

    (Alright, that wasn't a very good explaination now was it...)

    Catch me on MSN: dannyjoumaa@.NOSPAM.cox.net
    or AIM: NessAndAHalf
    Need help with anything related to audio programming? I can help!

  5. #5
    Join Date
    Mar 2004
    Posts
    43
    Thank all of you
    Ness:I think your way will work,and now i am using tha lame to encode the wave to mp3,but i want to try the directshow,thank you very much

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