[Openal] alGenSources(1, &s) for each audio event,
then alDeleteSources. what about memory fragmentation?
Daniel PEACOCK
dpeacock at creativelabs.com
Mon May 7 13:53:44 PDT 2007
Hi,
Generally I would recommend generating Sources at initialization time
because this will give better performance and probably save some memory
fragmentation as well.
Dan
Notice
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.
Andre Krause
<post at andre-kraus
e.net> To
Sent by: openal at opensource.creative.com
openal-bounces at op cc
ensource.creative
.com Subject
[Openal] alGenSources(1, &s) for
each audio event, then
05/06/2007 04:52 alDeleteSources. what about memory
AM fragmentation?
Please respond to
post at andre-krause
.net
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
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
ForwardSourceID:NT000407EA
More information about the Openal
mailing list