简体   繁体   English

MFC中的MCI设备错误

[英]MCI Device Error in MFC

MCI Error MCI错误

The specified file cannot be played on the specified MCI device. 指定的文件无法在指定的MCI设备上播放。 The file may be corrupt, not in the correct format, or no fil 该文件可能已损坏,格式不正确或没有文件

I have used following code to create a device and play the file. 我已使用以下代码创建设备并播放文件。

m_Path = _T("res\\phoneringing.mp3");
m_Video = MCIWndCreate(/*this->GetSafeHwnd()*/ m_hWnd,
AfxGetInstanceHandle(),WS_CHILD|WS_VISIBLE|MCIWNDF_NOMENU|MCIWNDF_NOPLAYBAR,m_Path);

I have observed that when my application creates the device second time using MCIWndCreate it throws this error. 我观察到,当我的应用程序第二次使用MCIWndCreate创建设备时,会引发此错误。

AFAIK those old 'multimedia' API's only work for AVIs for video and WAV for audio. AFAIK那些旧的“多媒体” API仅适用于视频的AVI和音频的WAV。 You'll probably want to embed Media Player for what you want to do. 您可能需要将Media Player嵌入到您想做的事情中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM