[Openal-devel] Map/Unmap API
Sherief N. Farouk
sherief at mganin.com
Thu Aug 13 21:39:51 PDT 2009
> In OpenGL, you can create PBOs to store pixel data to read from and
> write to
> textures and render surfaces. It allows for fast access as calls like
> glTexImage2D and co. can be scheduled to occur later and via DMA
> transfers. It
> also allows an app to map/unmap it to read and/or write quickly.
>
> Something like this could be useful to OpenAL too, I think. Often times
> when
> audio is decompressed, it requires the app to have a memory segment to
> write
> to and give to alBufferData. Since alBufferData needs to finish with
> the user
> pointer before returning, this would cause unnecessary waiting while
> it's
> copied and potentially converted. This would also be an issue for real-
> time
> generated streamed sounds.
>
I suggested this on the mailing list in March 2008, But it didn't make it
through (You can check the thread, called "Faster buffer model, and more
random stuff" for details of the discussion). Since then, I've implemented
two revisions of this map/unmap buffer model (the latter more strongly
worded than the former) and found it to be a bit faster (especially on
in-order architectures) and it saved me having to use a proprietary
extension on a gaming console, so I'd highly recommend it.
- Sherief
More information about the Openal-devel
mailing list