Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / How many sounds can be played in parallel?
- - By cyberarm Date 2014-01-26 14:43
How many sounds can be played in parallel without reduction of performance?
Parent - - By jlnr (dev) Date 2014-01-26 22:48
There's really no way to find out other than to run your game on a few old machines. :) It probably depends on everything from raw CPU power to your operating system's audio drivers.

Gosu has an arbitrary limit of 254 Samples and one Song playing at the same time, but I wouldn't be surprised if you could reduce performance with less than that.
Parent - By cyberarm Date 2014-01-26 23:34
In that case, my issue must arise from elsewhere (only playing 40 or so samples), and I don't have to implement a sample limiter for my game, which is good.
Now just to get ruby-prof to not crash. Or find something else.
Parent - - By EdwinOdesseiron Date 2014-01-27 08:38
Only one song at a time? Damn, there goes my background ambient :c
Parent - - By jlnr (dev) Date 2014-01-27 20:18
This is actually a surprisingly common restriction in audio libs. At least it used to be so in FMOD and SDL_mixer, which Gosu used at one time or another. The only platform where it still matters nowadays is iOS, where I'm not sure if I could get hardware acceleration for more than one song at a time.

Anyway, I'd love to remove the restriction, but it's not high on the list of priorities right now. :(
Parent - By EdwinOdesseiron Date 2014-01-27 21:56
Too bad. I guess I'll have to find a workaround for that. Probably a couple of Samples played at random intervals will work good enough.
Up Topic Gosu / Gosu Exchange / How many sounds can be played in parallel?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill