How to play the sound of an object sliding on another object for a variable duration
Posted
by
Antoine
on Game Development
See other posts from Game Development
or by Antoine
Published on 2012-06-05T23:45:11Z
Indexed on
2012/06/06
4:48 UTC
Read the original article
Hit count: 264
sound-effects
I would like to add sound effects to a basic 2D game. For example, a stone sphere is rolling on wood surface. Let's say I have a 2 second audio recording of this. How could I use the sample to add sound for an arbitrary duration ?
So far I have two solutions in mind:
a/ record the sound for an amount of time that is greater than the maximum expected duration, and play only a part of it;
b/ extract a small portion of the sample and play it in a loop for the duration of the move; however I'm not sure if it makes sense with an audio wave.
© Game Development or respective owner