Re: [LAU] Record levels lower in Alsa than Jack

From: Tim E. Real <termtech@email-addr-hidden>
Date: Sat Nov 07 2020 - 03:19:02 EET

On 11/6/20 10:06 AM, John Murphy wrote:
> On Fri, 6 Nov 2020 15:07:43 +0100 Fons Adriaensen <fons@email-addr-hidden> wrote:
>> On Fri, Nov 06, 2020 at 01:22:42PM +0000, John Murphy wrote:
>>
>>> Then sox stat shows min/max amplitude +/- 0.5 for the wav capture and
>>> +/- 0.9 for the wav converted from w64. The converted file looks good
>>> in my editor too.
>> Still doesn't explain the difference, unless I'm missing something...
>>
> There's a loss of precision in the conversion process. Both the original
> recordings show 25 bit precision and the file sizes are the same (3.8MB).
>
> The converted file is only 16 bit and is 1.9MB. It sounds (and looks)
> louder. I doubt I could tell any loss of quality. Not explaining it.
> Just providing some facts. :)
>
Maybe this is relevant?

According to my package manager, sox depends on libsndfile.

On the libsndfile website:
http://www.mega-nerd.com/libsndfile/api.html#note1

  it talks about normalization:

"When converting between integer data and floating point data, different
rules apply.

The default behaviour when reading floating point data (sf_read_float()
or sf_read_double ())

   from a file with integer data is normalisation. Regardless of whether
data in the file

   is 8, 16, 24 or 32 bit wide, the data will be read as floating point
data in the range [-1.0, 1.0].

Similarly, data in the range [-1.0, 1.0] will be written to an integer
PCM file so that

  a data value of 1.0 will be the largest allowable integer for the
given bit width.

This normalisation can be turned on or off using the sf_command
<http://www.mega-nerd.com/libsndfile/command.html> interface"

I recall observing that this normalization does tend to make the result
'louder'.

Could this be what is being observed?

Tim.

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
https://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat Nov 7 04:15:02 2020

This archive was generated by hypermail 2.1.8 : Sat Nov 07 2020 - 04:15:02 EET