OK. I figured out the source of the problem. I used this small Delphi MP3 Player Tutorial (you can download the project there ) to test your MP3 file, and I got the same error as with your MP3.
After some tests, I found out that other MP3 files play well with this tutorial application. Your MP3 worked well with Windows Media Player and other multimedia players.
Yes, re-encoding the file solves the problem, but this is not a real problem. The problem arises from the MP3 metadata (ID3 tags), and not from the audio encoding itself.
I used Mp3tag only to remove tags in the file, and after that everything worked out well, no EMCIDeviceError.
It seems that TMediaPlayer may break with some metadata format. I also saw TMediaPlayer error messages with MP3 files that were also included in the JPEG cover during my search.
Most of the people who answered people’s errors about TMediaPlayer in the forums I watched said that TMediaPlayer is really outdated and usually bad (I think it has not been updated in about 10 years). If you need powerful MP3 support in your application, consider another component . You can also use Windows Media Player ActiveX in your Delphi application.
For your additional question about try / except, try something like:
try //load & play here except on E:Exception do ShowMessage('Cannot be played! ' + E.Message); end;
Or consider using TApplicationEvents if it does not catch the error.
AlexV source share