ultraq / redhorizon

Recreating the original 2D Command & Conquer games
Apache License 2.0
6 stars 4 forks source link

Limit buffered frames/samples to the lookahead value #29

Closed ultraq closed 4 years ago

ultraq commented 4 years ago

Have noticed that, while I have blocking queues for the data coming from the streaming files, they're always being read waaaay ahead of the current play position because every render cycle drains the buffer empty, instead of only taking what it needs!

ultraq commented 4 years ago

lol, sometimes this leads to out-of-memory errors when I try cap the heap to something like 128MB 😅 Guess I better fix this one!