Musepack Forums  

Go Back   Musepack Forums > Main > Tech

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 06:34 am.


Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2019, vBulletin Solutions Inc.