同问 为什么不用PlaySound? If the specified sound cannot be found, sndPlaySound plays the system default sound. If there is no system default entry in the registry or WIN.INI file, or if the default sound cannot be found, the function makes no sound and returns FALSE.The specified sound must fit in available physical memory and be playable by an installed waveform-audio device driver.
ndPlaySound("声音文件wav路径",SND_ASYNC);
在定时器中。每次检查标志 如果标志成立
就执行ndPlaySound("声音文件wav路径",SND_ASYNC);这个语句。但客户反映
有时候听不到声音
If the specified sound cannot be found, sndPlaySound plays the system default sound. If there is no system default entry in the registry or WIN.INI file, or if the default sound cannot be found, the function makes no sound and returns FALSE.The specified sound must fit in available physical memory and be playable by an installed waveform-audio device driver.
可以考虑用其他播放方式
DSOUND之类的看看
ndPlaySound("声音文件wav路径",SND_ASYNC);
多谢
WIndows XP下如何使用??
继续求解
if(报警1条件成立)
sndPlaySound('声音文件1');
else if(报警条件2)
sndPlaySound('声音文件2');
else ....... 应该没有同时调用一个文件问题。