Files
Lyrebird/Sources/LyrebirdC/include/LyrebirdC.h
T
2026-06-01 18:27:40 -07:00

12 lines
570 B
C

#pragma once
/// Enables flush-to-zero mode on the calling thread's floating-point unit.
///
/// On ARM64, sets FPCR bit 24 (FZ — flush subnormal outputs to zero).
/// On x86-64, sets MXCSR bit 15 (FZ) and bit 6 (DAZ — treat subnormal inputs as zero).
///
/// Uses `fesetenv(FE_DFL_DISABLE_DENORMS_ENV)`, the macOS-standard mechanism for disabling
/// subnormal processing. This is thread-local state; call it at the start of each audio
/// render callback to guarantee the RT thread always runs with denormals suppressed.
void lyrebird_enable_flush_to_zero(void);