开发者

Why do I get this error "EMCIDeviceError" when opening some wav files in my program

H开发者_Python百科ey I have this program that has been working fine until I tried to open this one wav file? Not sure what the problem is or that I understand it? Do I need to find a new component to use for this file or what? I am using Delphi 4 Pro and the standard VCL component for Media Player. I am looking for a good new component that offers more help with wav and mp3 files too but not found what I am looking for yet?


Possible reasons for a EMCIDeviceError:

  1. It's known that mediaplayer has problems with some MP3 files, depending from the version of the mediaplayer that is installed on the machine. Try updating mediaplayer on the problem-machine(s).

  2. Maybe the sound drivers just need updating

  3. You also get an EMCIDeviceError if there is no soundcard, or the drivers are corrupted, or there are no drivers at all. But then it would not play any other MP3 files, so I just mention this to help out other Forum readers.


This kind of EMCIDeviceError is raised when you provide a fully qualified filename to the TMediaPlayer.FileName property which exceeds certain no of characters. It has nothing to do with having spaces in the filepath. For example if you play sounds from the EXE directory and just provide the relative shortname, no error seems to happen. Also with absolute filename from elsewhere, if it is shorter than a certain limit, there is no error. I encountered it in XE5 and have resorted to sndPlaySound().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜