View Single Post
Old 12 September 2007, 09:40 pm   #1
David1105
Member
 
Join Date: Sep 2007
Posts: 2
Default How to identify MPC or APE audio files?

I use the follow method to identify a MPC audio file

// MPC identifying characters MPC or MP+ (older version)
if ((s[0] == 'M' && s[1] == 'P' && s[2] == '+') || (s[0] == 'M' && s[1] == 'P' && s[2] == 'C'))
inputformat = InputFormat.MPC;

and use this method to identify APE file:

// APE identifying characters Hex: 4D 41 43 20 (ASCII: MAC)
if ((s[0] == 'M' && s[1] == 'A' && s[2] == 'C') )
inputformat = InputFormat.APE;

Please confirm if there's any problem with such soltuions?

Thanks!
David1105 is offline   Reply With Quote