首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用批处理脚本叠加2个音频片段并同时播放

如何使用批处理脚本叠加2个音频片段并同时播放
EN

Stack Overflow用户
提问于 2013-08-08 23:50:08
回答 1查看 83关注 0票数 2

我正在开发一个批量版本的COD:Black ops 2,我只有一个问题。当我想要同时播放两个音频剪辑时,它会一次播放一个音频剪辑。例如,每当玩家射击时,它都会发出声音效果。如果子弹击中僵尸,它会发出另一种声音效果。这两种音效都可以同时播放。至少在那里应该是这样。但它不起作用。我没有使用Windows Media player作为我的默认媒体播放器。下面是我的代码:

代码语言:javascript
复制
:shoot
set f%bullet%=Û
if %times% == 0 goto shot_sound
set /a times=%times% + 1

if %face% == 1 set /a bullet=%bullet% - 20
if %face% == 2 set /a bullet=%bullet% + 20
if %face% == 3 set /a bullet=%bullet% - 1
if %face% == 4 set /a bullet=%bullet% + 1
if %bullet% == %p2% goto hit2
if %bullet% == %p3% goto hit3
if %bullet% == %p4% goto hit4
if %bullet% == %p5% goto hit5
if %bullet% == %p6% goto hit6
if %bullet% == %p7% goto hit7
goto play

:shot_sound
set /a times=%times% + 1
if %n1% == gay_pistol start /min c:\Users\%username%\Desktop\zombies\pistol.mp3
if %n1% == Executioner start /min c:\Users\%username%\Desktop\zombies\Executioner.ogg
goto play




:hit2
start /min c:\Users\%USERNAME%\Desktop\zombies\zombie01.wma
if %hp2% leq 0 goto kill1
if %knife% == %p2% set /a hp2=%hp2% - %knife_power%
if %bullet% == %p2% set /a hp2=%hp2% - %power%
goto play    
EN

回答 1

Stack Overflow用户

发布于 2013-09-14 11:38:17

我无法测试这是否有效,因为我的计算机上没有任何音乐,但我相信输入:

call pistol.mp3

call Executioner.ogg

会成功的,希望它能帮上忙!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18130519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档