Skip to main content

custom_wave_values_into

Function custom_wave_values_into 

Source
pub fn custom_wave_values_into(
    out: &mut Vec<[f32; 2]>,
    p: &CustomWaveSampling,
    data1: &[f32],
    data2: &[f32],
)
Expand description

Port of the sample-preparation block of DrawCustomWaves: resampling, forward + backward smoothing and scaling. Fills out (cleared first) with (value1, value2) per point for the engine’s per-point code. data1/data2 are m_sound.fWaveform[0/1] (480 valid samples) or fSpectrum[0/1] (512).