I should have gone to bed by now but I just got ogg vorbis loading working (for small files). time to call it a night. next I need to figure out how to stream larger files.

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.

Show thread
Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!