17#ifdef SBL_PROFILING_ENABLED
18#define SBL_NAN_DETECTED() (++sbl::dsp::nan_detect_count())
20#define SBL_NAN_DETECTED() ((void)0)
42 for (uint16_t i = 0; i < frames; ++i) {
48 for (uint16_t i = 0; i < frames; ++i) {
59 float* left,
float* right,
61 for (uint16_t i = 0; i < frames; ++i) {
71#ifdef SBL_PROFILING_ENABLED
72inline uint32_t& nan_detect_count() {
73 static uint32_t count = 0;
89 for (uint16_t i = 0; i < frames; ++i) {
95 if (l > 1.0f) l = 1.0f;
96 if (l < -1.0f) l = -1.0f;
97 if (r > 1.0f) r = 1.0f;
98 if (r < -1.0f) r = -1.0f;
100 interleaved[i * 2 + 1] =
static_cast<int32_t
>(r *
SAMPLE_SCALE_F);
#define SBL_NAN_DETECTED()
DSP atoms for audio signal processing.
Sample to_sample(float f)
constexpr float SAMPLE_SCALE_INV_F
constexpr float SAMPLE_SCALE_F
void deinterleave_to_float(const int32_t *interleaved, float *left, float *right, uint16_t frames)
void interleave_from_float(const float *left, const float *right, int32_t *interleaved, uint16_t frames)