[Openal] alGenSources(1, &s) for each audio event,
then alDeleteSources. what about memory fragmentation?
dpeacock at creativelabs.com
Mon May 7 13:53:44 PDT 2007
Generally I would recommend generating Sources at initialization time
because this will give better performance and probably save some memory
fragmentation as well.
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
<post at andre-kraus
Sent by: openal at opensource.creative.com
openal-bounces at op cc
[Openal] alGenSources(1, &s) for
each audio event, then
05/06/2007 04:52 alDeleteSources. what about memory
Please respond to
post at andre-krause
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
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
Openal mailing list
Openal at opensource.creative.com
More information about the Openal