I'm new to audio format.
I'm trying to play audio data on device A as I receive it from device B , chunk by chunk. The problem is simply playing chunk by chunk does not produce any sound. If I combine all the chunks and then play, it works fine. But I want to make the application play real-time data, meaning I want to play the partial audio data the moment I receive it, even though the compete audio file has not been sent. I guess the chunk has to be in certain format to be played.
I searched on the net and learnt that MPEG_4 can be played in chunks as long as every chunk has a header. I wonder if it's possible that I add a header to each chunk manually.
I tried to record multiple samples and noticed they all have common bytes at the beginning as below:
0000 0018 6674 7970 6d70 3432 0000 0000
6973 6f6d 6d70 3432 0000 ....the rest..
Are these common bytes the header ? I wonder if there is a certain way that device A can tell if a certain chunk can be played so I can play the chunk as soon as I receive it ?
Any thought on this question would help! Thanks in advance!