sound.resample

sound

resample(buf, src_rate, dst_rate) -> resampled, err

Resample a buffer to a different sample rate

Linear interpolation. Returns a new buffer and leaves buf alone. Pass dev:rate() as dst_rate so an asset plays at its pitch. Returns nil and an error on failure.