However there is no clarification about the structure of a valid mp3 chunk (the author of the aforementioned doesn't go into this). I am aware of the various mp3 splitters that exist out there but i'd like to approach this programmatically. (I'm trying to implement a kind of 'poor man's streaming' using nodejs on the server side).
So, would splitting on mp3 frame headers be enough or do I need to do more? (perhaps 'closing' every chunk by appending some data at the end?) How about the 'byte reservoir'? Would this cause problems? For the record, I'm currently working with 128kbps cbr mp3s. Would this simplify the process in any way?
Any info on what decodeAudioData expects as vaild data would be appreciated.
PS: I realise that this is perhaps a request for clarification on Fair Dinkum Thinkum's post but my low reputation is keeping me from posting a comment. So I can't see how else to do it but with a new question. Thanks again.
After more experimentation with decodeAudioData (on Chrome) this is what I've found:
If you split your file into pieces starting with valid MP3 headers (12 bits of '1' aligned on byte boundary : FF Fx), you most probably would be fine.
©2020 All rights reserved.