0

I have a sound that needs to get played 10 times per second. The sound is 1 second long. So it does overlap like 10 times. However, as far as I understand the Finch sound library, I would need 10 different instances of a sound in place so that I can play it 10 times at almost the same time.

When I have just one instance, the sound would stop and play from the beginning on every iteration, but not overlap with itself.

How to do that?

dontWatchMyProfile
  • 45,440
  • 50
  • 177
  • 260

2 Answers2

1

In Finch it depends on how many instances of the particular sound you want to play simultaneously. Pass this number to the initWithFile:rounds: initializer of the RevolverSound class and it will allocate the desired number of copies of the sample.

zoul
  • 102,279
  • 44
  • 260
  • 354
0

Unlikely. Depends on the sound system/card and the API you're using. Usually it's fire and forget (where fire is load the data stream, tell audio system to play stream X times). To get it to overlap, you'd may need to use multiple channels. I'm not familiar with finch to know how it handles that sort of thing.

metasim
  • 4,793
  • 3
  • 46
  • 70