The best way that I've found to attempt to find a synch pattern, decode the frame (which gives you the frame length) and see if the next frame is a valid frame (i.e. is valid synch).
This won't guarantee that the whole file is valid but it does indicate that it contains at least one (probably two) valid MP3 frames.
Erik Turner
-- Original Message ----- From: "Sebastian Trueg" sebastian@trueg.de To: mad-dev@lists.mars.org Sent: Thursday, November 07, 2002 5:35 AM Subject: [mad-dev] test if file is mp3
Hy list, is there a good and fast way to test if a file actually is a mp3 file or not? My attempts with decoding some bytes at the beginning of the file do not work...
Thanx for help.
Cheers, Sebastian