在 C++/Direct X 中使用 XACT 制作简单的 2D 游戏
我正在尝试将我制作的声音效果放入我的游戏中。我有一个类似行走的声音,我想在用户行走时循环播放,一旦用户停止行走,我希望声音停止。我浏览了有关使用 XACT 的 DirectX 教程,但它没有回答我的问题。在我的代码中,我尝试使用播放功能,当它们不移动时,我停止行走的声音。发生的情况是,即使我停止移动,它也只会播放整个声音片段。
I'm trying to take sound effects I have made and put them into my game. I have a sound like walking that I want to loop while the user is walking and once the user stops walking, I want the sound to stop. I went through the DirectX tutorials on using XACT but it does not answer my question. In my code I try to use the play function and when they are not moving i stop the walking sound. What happens with this is it just plays the whole sound clip even when i stop moving.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否使用
XACT_FLAG_STOP_IMMEDIATE
标志?Are you using the
XACT_FLAG_STOP_IMMEDIATE
flag?