Musepack Forums  

Go Back   Musepack Forums > Main > Tech

Reply
 
Thread Tools Search this Thread Display Modes
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
Old 13 September 2007, 11:32 pm   #2
Antonski
Veteran Member
 
Join Date: Jun 2007
Location: Bulgaria
Posts: 102
Send a message via ICQ to Antonski Send a message via Yahoo to Antonski
Default

I believe it's much more reliable to use the file header instead of file name extension.
~
Antonski is offline   Reply With Quote
Old 13 September 2007, 11:35 pm   #3
David1105
Member
 
Join Date: Sep 2007
Posts: 2
Default

Quote:
Originally Posted by Antonski View Post
I believe it's much more reliable to use the file header instead of file name extension.
~
I was trying not to use file extension in my original post...

By the way, .MFC and .APE are the only file extensions for these two types of audio files? Is there any others?
David1105 is offline   Reply With Quote
Old 23 September 2007, 02:22 pm   #4
r2d
Musepack developer
 
Join Date: Sep 2006
Location: Villeurbanne - France
Posts: 36
Default

as you can see here :
http://trac.musepack.net/trac/wiki/SV8Specification
the new musepack file format starts with 'MPCK'

and from here :
http://trac.musepack.net/trac/wiki/SV7Specification
musepack files start with 'MP+' and not 'MPC'

Nicolas
r2d is offline   Reply With Quote
Reply

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 09:09 pm.


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