Sound Channels Handling Bug or Not?

In the game I’m working on, the player collects coins as they run. Lots of coins. Each coin should, of course, play some sort of sound when picked up. Here are my trials and problems:

  • Play sound at a random free channel ( using audio.findFreeChannel() and without ): Amazing Stutter!
  • Play sound at one channel: Not nice, cause channel has to wait for the previous sound to stop.
  • Play sound at one channel, WITH stopping previous play: Stutters
  • Reserve 12 channels (20-32) for the sound and play next free channel in turn: Amazing Stutter!
  • Don’t play sound :slight_smile: works ^^

I’m currently testing with one sound. Wave, PCM, 44100, and config.lua plays at the same frequency.

Sound file is preloaded and stored in a global variable.

Do you have any suggestions to solve this problem?

Thanks everyone! [import]uid: 91771 topic_id: 18403 reply_id: 318403[/import]

Can’t help, but can corroborate the stutter. Only showed up after I started using latest build, which I had to use because it fixed a previous audio bug brought on by iOS 5. In my case, although there is a stutter in the simulator, there is no stutter on the device (iPhone4). Also, I only see the stutter (in the simulator) when I play a sound a 2nd time.
[import]uid: 96383 topic_id: 18403 reply_id: 70638[/import]

If you guys are finding bugs, you need to submit bug reports. (We don’t always read the forums.) Not filing a bug is a sure way to make sure it doesn’t get seen/fixed. We are not aware of this issue.

We want a simple/isolated reproducible test case with all the needed assets included (so we can just run it) in your bug report with all the devices and OS’s you’ve tested on and the results you’ve seen. (The audio engine is 95% the same on all our platforms. But the underlying OpenAL implementations vary so by your description, it sounds like it could be a Apple/Mac bug, but we need to test further.)

[import]uid: 7563 topic_id: 18403 reply_id: 70647[/import]

Sorry, just starting with the programming thing and assume (as has always been the case so far) that I’m just doing something wrong :slight_smile: Probably true here too, I’m not qualified to submit a bug report. [import]uid: 96383 topic_id: 18403 reply_id: 70658[/import]

I’m not quite sure it’s a bug yet, that’s why.

I tried using ‘audio.seek’ for already created sound channels, it works great. Still I cannot instruct many channels to work at onces.

I’ll isolate samples in a couple of days and contact you again.

Thanks! :slight_smile:
Joseph [import]uid: 91771 topic_id: 18403 reply_id: 70734[/import]