[off-topic] Applying gain to an audio sample

Hans Petter Selasky hps at selasky.org
Fri Dec 20 18:46:10 UTC 2019


On 2019-12-20 19:43, Marcel Bonnet wrote:
> - read an audio sample as integer (stereo 16 bit LE)
> - convert to float
> - apply a gain, like: sample *= 0.3f
> - convert to integer again

The attachment is missing.

Probably better to use the host endian version of AFMT.

--HPS


More information about the freebsd-multimedia mailing list