为什么我会收到此错误“EMCIDeviceError”在我的程序中打开一些 wav 文件时
嘿,我有这个程序一直工作正常,直到我尝试打开这个 wav 文件?不确定问题是什么或者我理解它吗?我需要找到一个新组件用于该文件还是什么?我正在使用 Delphi 4 Pro 和媒体播放器的标准 VCL 组件。我正在寻找一个很好的新组件,它也可以为 wav 和 mp3 文件提供更多帮助,但还没有找到我要找的东西?
Hey 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
EMCIDeviceError 的可能原因:
众所周知,媒体播放器对某些 MP3 文件存在问题,具体取决于计算机上安装的媒体播放器的版本。尝试更新有问题的计算机上的媒体播放器。
也许声音驱动程序只需要更新
如果没有声卡,或者驱动程序已损坏,或者根本没有驱动程序,您也会收到 EMCIDeviceError。但是它不会播放任何其他 MP3 文件,所以我只是提到这一点来帮助其他论坛读者。
Possible reasons for a EMCIDeviceError:
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).
Maybe the sound drivers just need updating
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.
当您向 TMediaPlayer.FileName 属性提供超过特定字符数的完全限定文件名时,会引发此类 EMCIDeviceError。它与文件路径中的空格无关。例如,如果您从 EXE 目录播放声音并仅提供相对短名称,则似乎不会发生错误。同样,对于来自其他地方的绝对文件名,如果它短于某个限制,则不会出现错误。我在 XE5 中遇到了这个问题,并求助于 sndPlaySound()。
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().