audioconvert: add an option generate silence noise

Add an empty.noise option that specifies the number of bits to
use for noise when the input signal is pure silence.

Some amplifiers can go into suspend mode pretty easily when they
get pure silence. With empty.noise = 1, audioconvert will now generate
a bitpattern that can keep those amplifiers alive, together with
disabling suspend in the session manager.

Fixes #705
This commit is contained in:
Wim Taymans 2022-06-24 13:41:02 +02:00
parent 9430df0ba6
commit 1c6cb049ce
4 changed files with 182 additions and 29 deletions

View file

@ -94,7 +94,9 @@ audioconvert_lib = static_library('audioconvert',
'resample-peaks.c',
'fmt-ops-c.c',
'volume-ops.c',
'volume-ops-c.c' ],
'volume-ops-c.c',
'noise-ops.c',
'noise-ops-c.c' ],
c_args : [ simd_cargs, '-O3'],
link_with : simd_dependencies,
include_directories : [configinc],