Skip to main contentModule fixed
Source - apply_gain_q8
- Apply Q8 gain (0..=255) to sample.
- clamp_sample
- Soft clamp to 8-bit audio range.
- db_to_q8
- Convert decibel value (-48.0 dB .. 0.0 dB) to Q8 gain (0 ..= 255).
- hz_to_phase_inc
- Convert Hz to phase increment per sample:
(freq << 32) / sample_rate. - lerp_i8
- Linear interpolation between two i8 table entries;
frac is 0..=255. - mix_crossfade
- Mix two samples with crossfade weight
t_q8 (0 = a only, 255 = b only). - phase_index
- Upper 8 bits of phase, 0..=255.
- q8_to_db
- Convert Q8 gain (0 ..= 255) to decibels (-inf .. 0.0 dB).
- sin_table
- Parabolic sine approximation on 0..=255 index → -127..=127.
- Phase
- 32-bit phase accumulator (upper bits index wavetables).