Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2019 19:42:55 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Marcel Bonnet <marcelbonnet@gmail.com>, FreeBSD multimedia <freebsd-multimedia@freebsd.org>
Subject:   Re: [off-topic] Applying gain to an audio sample
Message-ID:  <77875a51-0cef-a27f-7d27-9eac8426bb74@selasky.org>
In-Reply-To: <CAPe0dB=BGyeLX3Xue=nNpHqRn8s-4xAO_T4Asmv-DUGk8uu2Jg@mail.gmail.com>
References:  <CAPe0dB=BGyeLX3Xue=nNpHqRn8s-4xAO_T4Asmv-DUGk8uu2Jg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?77875a51-0cef-a27f-7d27-9eac8426bb74>