开发者

Ball rolling sound effect

开发者 https://www.devze.com 2023-01-09 11:31 出处:网络
I am working on a Labyrinth style app for iPhone using Chipmunk and openAL. I got everything working except the ball rolling sound. What I hav开发者_开发百科e tried is playing a small sound for each u

I am working on a Labyrinth style app for iPhone using Chipmunk and openAL. I got everything working except the ball rolling sound. What I hav开发者_开发百科e tried is playing a small sound for each update in the ball's position so that the overall effect sounds like the ball is rolling. Based on advice on this forum I tired using velocity of the ball to adjust pitch of the sound. I have the following problems:

  1. I cant hear the sound at all when I am playing this sound in a chipmunk call back. I can hear it elsewhere.
  2. Even if I got this working somehow, the sound I should play has to be very very short as the ball doenst take too long to roll. THere has to be a alternate way.

Can anybody please help? I can even pay for a simple application that did this if the sound is also included.


I recommend cheating... record (or find somewhere) some longish looping sounds of the ball rolling at different speeds. Have one of them playing, based on the speed of the ball. As the ball's speed changes, you can cross-fade from one sample to another. My guess is that that will sound more realistic than just varying the pitch of a single sample.

Of course, it may be enough just to have one longish looping sample, and only vary the volume proportional to the ball's speed. I'll have to go track down my labyrinth game and check. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号