[Openal] alGenSources(1, &s) for each audio event,
then alDeleteSources. what about memory fragmentation?
Andre Krause
post at andre-krause.net
Sun May 6 04:52:29 PDT 2007
i currently implemented audio in my game this way:
* i have a list of audiobuffers holding sample data from wav files
* for each audio event (keypress klick for example) i generate a new
Source with alGensources
* if state==AL_STOPPED , i delete the source with alDeleteSources.
question: is this good practice? or should i reuse the source if
possible? how are sources internally allocated? using a memory pool
allocator? or just malloc or such so that it could be prone to memory
fragmentation ?
just asking, my method works very fine so far under windowsxp, openAL
1.1, but who knows what happens on different systems...
kind regards, andre
More information about the Openal
mailing list