I started making a buffer pool so I could reuse the same memory over and over for streaming audio. for starters I'm using 512KB buffers, which is plenty of space to hold most short sound effects, but a music track will fill up a whole bunch of buffers. I think I will use delimited continuations to make generators that yield a chunk of audio each time they are called. then it's a matter of making sure that the OpenAL sources always have the next chunk ready before the current chunk is done.
A Mastodon instance for cats, the people who love them, and kindness in general. We strive to be a radically inclusive safe space. By creating an account, you agree to follow our CoC below.