You are here

Add new comment

rncbc's picture

well, you seem willing to parse audio files under a php script, isn't it?

let's take a look: wav files are kind of raw files re. sample audio data. that meaning they're not encoded. you read a frame (8bit or 16bit sample) and go on with it, provided you read the header portion of the file giving you the fundamental characteristics of the digital audio data that follows...

now. ogg, mp3 and flac are different beasts. in the sense that digital audio data are encoded and those files have some special structure, way more complex than a raw stream you find on wav files (after the header, that is).

so. you probably want to know, that to read ogg files (or any other encoded format), you should bring a decoder implementation into the scene: for example, qtractor does use libvorbis et al. for ogg audio files. now there's a question whether is there any libvorbis aware php extension out there. i'll bet there are, some :)

i'll leave you there. homework exercise ;)