Scope guard that clears audio::Context history on test exit, preventing state leakage between test cases while preserving the expensive audio::fft::FFT kernel cache.
| 43 | // preventing state leakage between test cases while preserving |
| 44 | // the expensive audio::fft::FFT kernel cache. |
| 45 | static void cleanupSharedContext() { |
| 46 | auto& ctx = sharedAudioContext(); |
| 47 | if (ctx) { |
| 48 | ctx->clearCache(); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | #define VOCAL_TEST_CLEANUP auto cleanup = fl::make_scope_exit(cleanupSharedContext) |
| 53 |
nothing calls this directly
no test coverage detected