Openal is stupid with its source number limit, you cannot have more than 16 sources... a possible solution is, to create a sound manager, which will automaticly create and destroy physical sound sources of a virtual sound sources list, depending on their priority (like distance to the listener).
i intend to write one, but i'm just asking here first if anybody has one already
EDIT:
from page 2:
[/code]This is now improved version, i added full audio system pause (!) fixed sorting (also now uses bidirectional bubble sort, but something better should be used like quicksort? )
I added audio buffer loading and searching (no unloading but you can do it manually yourself)
The source-swaping works well, i just tested it in my game with 50 cars in same scene, and it performs as expected. distant sounds are swaped-out and near sounds are swaped-in to get smoothly around the openal 30 playing sounds limit.
Link:
https://github.com/JernejL/VirtualOpenAL
This source code is free for any use. i would especialy like to see someone add it to glscene, which currently only supports fmod and bass, which are both commercial products.
Bookmarks