[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
On Wed, Jan 4, 2012 at 4:10 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> If I understood correctly, there is an arbitrarily long gap between when
> the user provided buffer is filled and the next call to
> al_update_audio_recorder_buffer. To avoid any skips the data must be
> kept somewhere in the meantime. I guess PulseAudio, being a high level
> library, provides conveniently large buffers that can bridge that gap.
Yes. I assumed that any modern sound API would work like PA. Its
buffer is independent of latency. So even though I've set a low
latency, I still have a large (default setting) buffer. PA will
happily buffer for a long time (many seconds, at least).
So to me, it didn't make any sense to copy from PA's buffer into a
small Allegro buffer and then from there into a user's buffer if they
want to store it elsewhere. But if PA is the exception, then of course
the API shouldn't be designed around it.
No matter what approach is taken, obviously the user still needs to
keep up with the buffer. Even if Allegro has two (or more) internal
buffers and swaps between them, you could still get behind.