Unable to play two sounds at the same time

Can somebody explain me why I cant play two sounds at the same time ? here a part of the code : #include FMOD_SYSTEM *system; FMOD_SOUND *dooropen; FMOD_SOUND *keydoor; FMOD_SOUND *slap; FMOD_SOUND *bomb; FMOD_SOUND *scratch; FMOD_SOUND *secret; FMOD_SOUND *pickey; FMOD_SOUND *caisse; FMOD_RESULT resultat1; FMOD_RESULT resultat2; FMOD_RESULT resultat3; FMOD_RESULT resultat4; FMOD_RESULT resultat5; FMOD_RESULT resultat6; FMOD_RESULT resultat7; FMOD_RESULT resultat8; FMOD_System_Create(&system); FMOD_System_Init(system, 1, FMOD_INIT_NORMAL, NULL); resultat1 = FMOD_System_CreateSound(system, "sound/door-open.mp3", FMOD_CREATESAMPLE, 0, &dooropen); resultat2 = FMOD_System_CreateSound(system, "sound/key-door.wav", FMOD_CREATESAMPLE, 0, &keydoor); resultat3 = FMOD_System_CreateSound(system, "sound/slap.wav", FMOD_CREATESAMPLE, 0, &slap); resultat4 = FMOD_System_CreateSound(system, "sound/bomb.wav", FMOD_CREATESAMPLE, 0, &bomb); resultat5 = FMOD_System_CreateSound(system, "sound/scratch.wav", FMOD_CREATESAMPLE, 0, &scratch); resultat6 = FMOD_System_CreateSound(system, "sound/secret.wav", FMOD_CREATESAMPLE, 0, &secret); resultat7 = FMOD_System_CreateSound(system, "sound/pickey.wav", FMOD_CREATESAMPLE, 0, &pickey); resultat8 = FMOD_System_CreateSound(system, "sound/caisse.wav", FMOD_CREATESAMPLE, 0, &caisse); And I call my sounds like this : FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, scratch, 0, NULL); FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, bomb, 0, NULL); I think there's a channel problem because when I played "bomb" I can hear it (this sound is like 3 seconds) but if the "scratch" sounds happens the sound "bomb" is stopping...

以上就是Unable to play two sounds at the same time的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » CSS3 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏