Hi, i'm coding in simple game where i move a square which performs a sound effect each time the square's moving. (like a walking sound)
Problem is playing the sound effect cause a display refresh lag. As if it was too much performance for the engine. I was asking if there's a way to properly play the repeatitive but not continuously sound (this is not really a loop, but it could be if the walking was endless)
here my function: ... the way i initialized the audio Object
moveSound = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:nil];
and here the function where it is called
...
{
moveSound.currentTime = 0;
[moveSound play];
}
is there 's a good way to do it? thx