someone help!
how to split an audio file into chunks using c++?
and merging it again...

7 Years
Discussion Span
Last Post by chiwawa10

Open audio file into binary mode and copy data into different file.............. as

Edited by prvnkmr449: n/a


Hi nhidman, what are you trying to achieve by splitting and then merging the audio file? One simple example has been given by prvnkmr449. That is to treat the audio file just like any other binary file. Split them into the number of chunks that you like. Then reading each chunk and writing them into another file (which will be the same as your original). You will be able to play the audio file after merging the files. However, it is very unlikely that you will be able to play the smaller chunks (those that were splitted randomly).

If you want to be able to play the smaller chunks, you will have to study the encoding of the audio and split it correctly, stopping at the correct byte, for each chunk. (be warned that this can be a lot tougher than the first example)

First of all, you have to make clear what you're trying to achieve.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.