I'm working on a wrap-around Asteroids-style shooter. I wanted to mark the edge of the field with sound, since the player probably wants to be a bit more careful flying near it since asteroids may suddenly wrap into their play area. Initially I modeled this by essentially creating audio fence posts--sound sources every few units to create an audio border. This worked a bit, but when I bumped up the density of my posts (I.e. one every 4 border units instead if 5) I got an "out of memory" error. I assume that's memory on the sound hardware and not the computer, since this box has 32 GB of RAM and hasn't come anywhere close to anything I'd worry about.
Needless to say I scrapped that implementation idea and am now trying something much more complex with raycasting, and field borders that only collide with rays extending from the player's front/left/right/back. I'll then only position 4 audio sources at the nearest point of intersection between these rays and the field borders such that the player is in the center of 4 moving sound sources representing the nearest contact with the border. But I'm a bit worried that OpenAL hit a limit at less than 100 sounds. I mean, I know sound hardware has practical limits, but I'd hoped for some intelligent mixing/culling to identify quieter sounds and either trim them from the mix, or combine them in some way that at least acknowledged they're there without allocating a distinct source for each.
Is there some OpenAL limit I need to be aware of when rendering sound? I'm not familiar with OpenAL extensions--are there any I can enable to fix this? I don't know what the source limit is, but between music, bullets, player sounds, and lots of fragmenting asteroids, I'd hate for a player to hit it and crash the game. Or is this limit something I don't have to worry about unless I do something else stupid, like create 80-90 audio fence posts for my field?
And as an aside, is OpenAL the only game in town for open source/reasonably priced cross-platform audio? I'm targetting at least Linux and Windows (and maybe MacOS if I can get a Mac at some point), so cross-platform is essential. OpenAL isn't bad, but jokes about my stupidity aside, I didn't think I placed too many demands on my sound hardware, and I really thought OpenAL would handle the excess in some way other than completely crashing the game.
Thanks.