How to save a datastream in mp3 format?

227 views Asked by At

I am receiving an mp3 file in packets over network and want to save them in mp3 format on my computer. I am programming in C++ and using Qt Creator as IDE.

To be more specific, I am storing the received data in a QDataStream object which is automatically writing to the file it is connected to... Do I need any encoding or should I just name the file MyMusic.mp3 and that was it?

Thanks in advance

1

There are 1 answers

0
TheDarkKnight On BEST ANSWER

If the data you are receiving is an MP3, then it has already been encoded in that format. You just need to write it out to a file that has the extension .mp3