[linux-audio-dev] Sound file format detection?

From: Mario Lang <mlang@email-addr-hidden>
Date: Sun Oct 02 2005 - 15:01:50 EEST

Hi.

My little time-compressing audio player yatm currently supports 3 different
audio formats, ogg and speex via the xiph libraries, and mpeg via libmad.
I currently just blindly try to launch the decoder for either ogg, speex or
mp3 in series. SO if the first fails, I try the second, and so on. Which
kinda works but is a bit ugly. I'd like to add flac support at some point,
which would make this even more ugly.
Additionally, libsndfile support wouldnt be that bad either, so, I am
wondering, is there a reliable way to detect a audio streams file
format just given some bits of the header? So that I could set the
appropriate decoder algorithm based on that analysis? Or is
there actually a library one step higher level than libsndfile which
does generic audioformat to PCM? I guess not...

-- 
CYa,
  Mario
Received on Sun Oct 2 16:15:05 2005

This archive was generated by hypermail 2.1.8 : Sun Oct 02 2005 - 16:15:05 EEST