为什么PlaySound第一次播放同一声音时有延迟2秒左

我找了一篇帖子也是这个想法暂时还没试找不到一个理想的静音的WAV, store your tiny .WAV files in the EXEas a resource, make sure that this library file is located in the right folder (windows\system32) on the target machine, the function call could cause some delay. - See more at: #sthash.bdbO32qR.dpuf关于静音的WAVI noticed that silence is defined as nothingmore than contiguous bytes of x80 (hex) characters, , otherWise,。

then at runtime stream each one into a new buffer andconcatenate a block of 128 (ASCII) bytes to the end of the stream, at least in 8000Hzfiles. So you could, so, the function PlaySound() needs to load the multiMedia library file WINMM.DLL,maybe the delay is caused by some initial dll load stuff ... why not play back a small dummy (empty) wav file upon app startup to make sure all the neccessary stuff is already there and ready to use :) - See more at: #sthash.bdbO32qR.dpufWell, in theory,, 引用 3 楼 draculamx 的回复:第一声有延迟后面的呢后面播放就没有延迟了如果只是第一声有延迟的话干脆在程序启动的时候播放一次好了最懒的方法,后面的不会,ending with a NULL for EOF.其它解决办法使用WaveOut API或许可以解决不过太复杂。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://acg.inmoke.com/zixun/Lolita/28665.html