Geometry Nodes: Reuse audio readers for sound frequency sampling

Reuse AUDASPACE readers between uncached Sample Sound Frequencies windows
instead of creating a new reader for every window.

Readers are acquired through a small cache associated with the current
`bSound` runtime generation. An RAII lease automatically returns readers after
use, while failed seek or read operations discard potentially invalid readers.

The cache retains at most two idle readers. When all cached readers are in use,
a new reader is created outside the cache lock instead of making concurrent
evaluations wait.

Cached samplers and their reader cache remain alive for evaluations already in
progress when a sound is reloaded or freed.
This commit is contained in:
Tibo Stans 2026-08-10 18:48:26 +02:00 • committed by Jacques Lucke
parent ef73004e74
commit e4218ae71a
9 changed files with 462 additions and 37 deletions

View file

@ -1281,6 +1281,10 @@ if(TEST_SRC_DIR_EXISTS)
vector
)
if(WITH_AUDASPACE AND WITH_FFTW3)
list(APPEND geo_node_tests sound)
endif()
if(WITH_GMP)
list(APPEND geo_node_tests mesh/boolean)
endif()