libobs: Add audio control functions

This adds a new library of audio control functions mainly for the use in
GUIS. For now it includes an implementation of a software fader that can
be attached to sources in order to easily control the volume.
The fader can translate between fader-position, volume in dB and
multiplier with a configurable mapping function.
Currently only a cubic mapping (mul = fader_pos ^ 3) is included, but
different mappings can easily be added.

Due to libobs saving/restoring the source volume from the multiplier,
the volume levels for existing source will stay the same, and live
changing of the mapping will work without changing the source volume.
This commit is contained in:
fryshorts
2014-11-19 00:50:32 +01:00
parent e994d6d498
commit 8dcbd77bf2
4 changed files with 447 additions and 0 deletions

View File

@@ -190,6 +190,7 @@ set(libobs_util_HEADERS
set(libobs_libobs_SOURCES
${libobs_PLATFORM_SOURCES}
obs-audio-controls.c
obs-avc.c
obs-encoder.c
obs-service.c
@@ -204,6 +205,7 @@ set(libobs_libobs_SOURCES
obs-scene.c
obs-video.c)
set(libobs_libobs_HEADERS
obs-audio-controls.h
obs-defs.h
obs-avc.h
obs-encoder.h