Uploaded March 2022 | Updated November 2026, 4 days ago
leafac.com · github.com/leafac/reaper
———
We talked about 4 issues with the current waveform drawing situation:
1. Flickering at the edges of peaks.
2. CPU use on the audio thread.
3. Scrolling isn’t smooth.
4. There’s a glitchy line at the left, showing the race condition between the audio and the gfx threads when accessing the circular buffer.
We talked about a solution to all these problems:
1. Using a circular buffer just for the communication between the audio and the gfx threads.
2. The gfx thread doesn‘t read from this circular buffer based on an offset of the write index, but keeps its own read index that catches up to the write index.
3. The gfx thread reads the samples from the circular buffer, computes the slices, and stores them for drawing.
4. We’ll play with the idea of this storage happening on a different gfx_dest.
We were able to implement parts 1 and 2 of the idea above.
leafac.com · github.com/leafac/reaper
———
We talked about 4 issues with the current waveform drawing situation:
1. Flickering at the edges of peaks.
2. CPU use on the audio thread.
3. Scrolling isn’t smooth.
4. There’s a glitchy line at the left, showing the race condition between the audio and the gfx threads when accessing the circular buffer.
We talked about a solution to all these problems:
1. Using a circular buffer just for the communication between the audio and the gfx threads.
2. The gfx thread doesn‘t read from this circular buffer based on an offset of the write index, but keeps its own read index that catches up to the write index.
3. The gfx thread reads the samples from the circular buffer, computes the slices, and stores them for drawing.
4. We’ll play with the idea of this storage happening on a different gfx_dest.
We were able to implement parts 1 and 2 of the idea above.










