Re: Clean up memory after playing sound
Carsten Fuchs <[email protected]>
| Newsgroups | gmane.comp.lib.openal |
|---|---|
| Message-ID | <[email protected]> |
Hi Chris,
Am 30.05.2010 12:12, schrieb Chris Robinson:
> Yes, though it's not typically done. Streaming sources usually have their
> buffers unqueued, refilled, and requeued while they play, which makes it
> difficult to share them with multiple sources. You can't call alBufferData on
> a buffer that is attached or queued to a source, and it would be difficult to
> determine if the buffer you just unqueued is in use by another source or not.
Ok, many thanks for clarifying this.
The constraint then is obviously that the sources must all be "in sync" regarding the buffer
queue, which is certainly a rare corner case.
I was asking because one such case occurs in an abstraction layer on top of OpenAL, when you're
for example capturing audio data and queue that to multiple (spatial) sources in a FPS game
world. (Capturing audio is "more naturally in sync" regarding buffer queues than e.g. streaming
from a file, due to the strictly linear timeline (no rewind).)
However, thinking a while about it, I very much agree... this still seems somewhat complicated
to get right. ;-)
Best regards,
Carsten
--
Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
Learn more at http://www.cafu.de
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal
smime.p7s
(application/pkcs7-signature, 5 KB) - not displayed