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
Printable View
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
You need a librabry that does this for you. For example BASS, Fmod, DirectShow...
I would go with FMOD. It is very good and easy to use.
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: [email protected]
or AIM: NessAndAHalf
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