Merge pull request #1979 from cg2121/suffixes
UI, obs-plugins: Add spinbox suffixes where necessary
This commit is contained in:
@@ -115,8 +115,9 @@ static obs_properties_t *async_delay_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_int(props, SETTING_DELAY_MS, TEXT_DELAY_MS, 0, 20000,
|
||||
1);
|
||||
obs_property_t *p = obs_properties_add_int(props, SETTING_DELAY_MS,
|
||||
TEXT_DELAY_MS, 0, 20000, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
|
@@ -499,22 +499,31 @@ static obs_properties_t *compressor_properties(void *data)
|
||||
struct compressor_data *cd = data;
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
obs_source_t *parent = NULL;
|
||||
obs_property_t *p;
|
||||
|
||||
if (cd)
|
||||
parent = obs_filter_get_parent(cd->context);
|
||||
|
||||
obs_properties_add_float_slider(props, S_RATIO, TEXT_RATIO, MIN_RATIO,
|
||||
MAX_RATIO, 0.5);
|
||||
obs_properties_add_float_slider(props, S_THRESHOLD, TEXT_THRESHOLD,
|
||||
MIN_THRESHOLD_DB, MAX_THRESHOLD_DB,
|
||||
0.1);
|
||||
obs_properties_add_int_slider(props, S_ATTACK_TIME, TEXT_ATTACK_TIME,
|
||||
MIN_ATK_RLS_MS, MAX_ATK_MS, 1);
|
||||
obs_properties_add_int_slider(props, S_RELEASE_TIME, TEXT_RELEASE_TIME,
|
||||
MIN_ATK_RLS_MS, MAX_RLS_MS, 1);
|
||||
obs_properties_add_float_slider(props, S_OUTPUT_GAIN, TEXT_OUTPUT_GAIN,
|
||||
MIN_OUTPUT_GAIN_DB, MAX_OUTPUT_GAIN_DB,
|
||||
0.1);
|
||||
p = obs_properties_add_float_slider(props, S_RATIO, TEXT_RATIO,
|
||||
MIN_RATIO, MAX_RATIO, 0.5);
|
||||
obs_property_float_set_suffix(p, ":1");
|
||||
p = obs_properties_add_float_slider(props, S_THRESHOLD, TEXT_THRESHOLD,
|
||||
MIN_THRESHOLD_DB, MAX_THRESHOLD_DB,
|
||||
0.1);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
p = obs_properties_add_int_slider(props, S_ATTACK_TIME,
|
||||
TEXT_ATTACK_TIME, MIN_ATK_RLS_MS,
|
||||
MAX_ATK_MS, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
p = obs_properties_add_int_slider(props, S_RELEASE_TIME,
|
||||
TEXT_RELEASE_TIME, MIN_ATK_RLS_MS,
|
||||
MAX_RLS_MS, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
p = obs_properties_add_float_slider(props, S_OUTPUT_GAIN,
|
||||
TEXT_OUTPUT_GAIN,
|
||||
MIN_OUTPUT_GAIN_DB,
|
||||
MAX_OUTPUT_GAIN_DB, 0.1);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
|
||||
obs_property_t *sources = obs_properties_add_list(
|
||||
props, S_SIDECHAIN_SOURCE, TEXT_SIDECHAIN_SOURCE,
|
||||
|
@@ -14,7 +14,7 @@ NoiseGate="Noise Gate"
|
||||
NoiseSuppress="Noise Suppression"
|
||||
InvertPolarity="Invert Polarity"
|
||||
Gain="Gain"
|
||||
DelayMs="Delay (milliseconds)"
|
||||
DelayMs="Delay"
|
||||
Type="Type"
|
||||
MaskBlendType.MaskColor="Alpha Mask (Color Channel)"
|
||||
MaskBlendType.MaskAlpha="Alpha Mask (Alpha Channel)"
|
||||
@@ -50,12 +50,12 @@ Red="Red"
|
||||
Green="Green"
|
||||
Blue="Blue"
|
||||
Magenta="Magenta"
|
||||
NoiseGate.OpenThreshold="Open Threshold (dB)"
|
||||
NoiseGate.CloseThreshold="Close Threshold (dB)"
|
||||
NoiseGate.AttackTime="Attack Time (milliseconds)"
|
||||
NoiseGate.HoldTime="Hold Time (milliseconds)"
|
||||
NoiseGate.ReleaseTime="Release Time (milliseconds)"
|
||||
Gain.GainDB="Gain (dB)"
|
||||
NoiseGate.OpenThreshold="Open Threshold"
|
||||
NoiseGate.CloseThreshold="Close Threshold"
|
||||
NoiseGate.AttackTime="Attack Time"
|
||||
NoiseGate.HoldTime="Hold Time"
|
||||
NoiseGate.ReleaseTime="Release Time"
|
||||
Gain.GainDB="Gain"
|
||||
StretchImage="Stretch Image (discard image aspect ratio)"
|
||||
Resolution="Resolution"
|
||||
Base.Canvas="Base (Canvas) Resolution"
|
||||
@@ -66,26 +66,26 @@ ScaleFiltering.Bilinear="Bilinear"
|
||||
ScaleFiltering.Bicubic="Bicubic"
|
||||
ScaleFiltering.Lanczos="Lanczos"
|
||||
ScaleFiltering.Area="Area"
|
||||
NoiseSuppress.SuppressLevel="Suppression Level (dB)"
|
||||
NoiseSuppress.SuppressLevel="Suppression Level"
|
||||
Saturation="Saturation"
|
||||
HueShift="Hue Shift"
|
||||
Amount="Amount"
|
||||
Compressor="Compressor"
|
||||
Compressor.Ratio="Ratio (X:1)"
|
||||
Compressor.Threshold="Threshold (dB)"
|
||||
Compressor.AttackTime="Attack (ms)"
|
||||
Compressor.ReleaseTime="Release (ms)"
|
||||
Compressor.OutputGain="Output Gain (dB)"
|
||||
Compressor.Ratio="Ratio"
|
||||
Compressor.Threshold="Threshold"
|
||||
Compressor.AttackTime="Attack"
|
||||
Compressor.ReleaseTime="Release"
|
||||
Compressor.OutputGain="Output Gain"
|
||||
Compressor.SidechainSource="Sidechain/Ducking Source"
|
||||
Limiter="Limiter"
|
||||
Limiter.Threshold="Threshold (dB)"
|
||||
Limiter.ReleaseTime="Release (ms)"
|
||||
Limiter.Threshold="Threshold"
|
||||
Limiter.ReleaseTime="Release"
|
||||
Expander="Expander"
|
||||
Expander.Ratio="Ratio (X:1)"
|
||||
Expander.Threshold="Threshold (dB)"
|
||||
Expander.AttackTime="Attack (ms)"
|
||||
Expander.ReleaseTime="Release (ms)"
|
||||
Expander.OutputGain="Output Gain (dB)"
|
||||
Expander.Ratio="Ratio"
|
||||
Expander.Threshold="Threshold"
|
||||
Expander.AttackTime="Attack"
|
||||
Expander.ReleaseTime="Release"
|
||||
Expander.OutputGain="Output Gain"
|
||||
Expander.Detector="Detection"
|
||||
Expander.RMS="RMS"
|
||||
Expander.Peak="Peak"
|
||||
|
@@ -387,6 +387,7 @@ static bool presets_changed(obs_properties_t *props, obs_property_t *prop,
|
||||
static obs_properties_t *expander_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
obs_property_t *p;
|
||||
|
||||
obs_property_t *presets = obs_properties_add_list(
|
||||
props, S_PRESETS, TEXT_PRESETS, OBS_COMBO_TYPE_LIST,
|
||||
@@ -394,18 +395,26 @@ static obs_properties_t *expander_properties(void *data)
|
||||
obs_property_list_add_string(presets, TEXT_PRESETS_EXP, "expander");
|
||||
obs_property_list_add_string(presets, TEXT_PRESETS_GATE, "gate");
|
||||
obs_property_set_modified_callback(presets, presets_changed);
|
||||
obs_properties_add_float_slider(props, S_RATIO, TEXT_RATIO, MIN_RATIO,
|
||||
MAX_RATIO, 0.1);
|
||||
obs_properties_add_float_slider(props, S_THRESHOLD, TEXT_THRESHOLD,
|
||||
MIN_THRESHOLD_DB, MAX_THRESHOLD_DB,
|
||||
0.1);
|
||||
obs_properties_add_int_slider(props, S_ATTACK_TIME, TEXT_ATTACK_TIME,
|
||||
MIN_ATK_RLS_MS, MAX_ATK_MS, 1);
|
||||
obs_properties_add_int_slider(props, S_RELEASE_TIME, TEXT_RELEASE_TIME,
|
||||
MIN_ATK_RLS_MS, MAX_RLS_MS, 1);
|
||||
obs_properties_add_float_slider(props, S_OUTPUT_GAIN, TEXT_OUTPUT_GAIN,
|
||||
MIN_OUTPUT_GAIN_DB, MAX_OUTPUT_GAIN_DB,
|
||||
0.1);
|
||||
p = obs_properties_add_float_slider(props, S_RATIO, TEXT_RATIO,
|
||||
MIN_RATIO, MAX_RATIO, 0.1);
|
||||
obs_property_float_set_suffix(p, ":1");
|
||||
p = obs_properties_add_float_slider(props, S_THRESHOLD, TEXT_THRESHOLD,
|
||||
MIN_THRESHOLD_DB, MAX_THRESHOLD_DB,
|
||||
0.1);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
p = obs_properties_add_int_slider(props, S_ATTACK_TIME,
|
||||
TEXT_ATTACK_TIME, MIN_ATK_RLS_MS,
|
||||
MAX_ATK_MS, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
p = obs_properties_add_int_slider(props, S_RELEASE_TIME,
|
||||
TEXT_RELEASE_TIME, MIN_ATK_RLS_MS,
|
||||
MAX_RLS_MS, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
p = obs_properties_add_float_slider(props, S_OUTPUT_GAIN,
|
||||
TEXT_OUTPUT_GAIN,
|
||||
MIN_OUTPUT_GAIN_DB,
|
||||
MAX_OUTPUT_GAIN_DB, 0.1);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
obs_property_t *detect = obs_properties_add_list(
|
||||
props, S_DETECTOR, TEXT_DETECTOR, OBS_COMBO_TYPE_LIST,
|
||||
OBS_COMBO_FORMAT_STRING);
|
||||
|
@@ -76,8 +76,9 @@ static obs_properties_t *gain_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
|
||||
obs_properties_add_float_slider(ppts, S_GAIN_DB, TEXT_GAIN_DB, -30.0,
|
||||
30.0, 0.1);
|
||||
obs_property_t *p = obs_properties_add_float_slider(
|
||||
ppts, S_GAIN_DB, TEXT_GAIN_DB, -30.0, 30.0, 0.1);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return ppts;
|
||||
|
@@ -148,7 +148,9 @@ static obs_properties_t *gpu_delay_filter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_int(props, S_DELAY_MS, T_DELAY_MS, 0, 500, 1);
|
||||
obs_property_t *p = obs_properties_add_int(props, S_DELAY_MS,
|
||||
T_DELAY_MS, 0, 500, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
|
@@ -196,12 +196,16 @@ static void limiter_defaults(obs_data_t *s)
|
||||
static obs_properties_t *limiter_properties(void *data)
|
||||
{
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
obs_property_t *p;
|
||||
|
||||
obs_properties_add_float_slider(props, S_THRESHOLD, TEXT_THRESHOLD,
|
||||
MIN_THRESHOLD_DB, MAX_THRESHOLD_DB,
|
||||
0.1);
|
||||
obs_properties_add_int_slider(props, S_RELEASE_TIME, TEXT_RELEASE_TIME,
|
||||
MIN_ATK_RLS_MS, MAX_RLS_MS, 1);
|
||||
p = obs_properties_add_float_slider(props, S_THRESHOLD, TEXT_THRESHOLD,
|
||||
MIN_THRESHOLD_DB, MAX_THRESHOLD_DB,
|
||||
0.1);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
p = obs_properties_add_int_slider(props, S_RELEASE_TIME,
|
||||
TEXT_RELEASE_TIME, MIN_ATK_RLS_MS,
|
||||
MAX_RLS_MS, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return props;
|
||||
|
@@ -169,18 +169,25 @@ static void noise_gate_defaults(obs_data_t *s)
|
||||
static obs_properties_t *noise_gate_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
obs_property_t *p;
|
||||
|
||||
obs_properties_add_float_slider(ppts, S_CLOSE_THRESHOLD,
|
||||
TEXT_CLOSE_THRESHOLD, VOL_MIN, VOL_MAX,
|
||||
1.0);
|
||||
obs_properties_add_float_slider(ppts, S_OPEN_THRESHOLD,
|
||||
TEXT_OPEN_THRESHOLD, VOL_MIN, VOL_MAX,
|
||||
1.0);
|
||||
obs_properties_add_int(ppts, S_ATTACK_TIME, TEXT_ATTACK_TIME, 0, 10000,
|
||||
1);
|
||||
obs_properties_add_int(ppts, S_HOLD_TIME, TEXT_HOLD_TIME, 0, 10000, 1);
|
||||
obs_properties_add_int(ppts, S_RELEASE_TIME, TEXT_RELEASE_TIME, 0,
|
||||
10000, 1);
|
||||
p = obs_properties_add_float_slider(ppts, S_CLOSE_THRESHOLD,
|
||||
TEXT_CLOSE_THRESHOLD, VOL_MIN,
|
||||
VOL_MAX, 1.0);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
p = obs_properties_add_float_slider(ppts, S_OPEN_THRESHOLD,
|
||||
TEXT_OPEN_THRESHOLD, VOL_MIN,
|
||||
VOL_MAX, 1.0);
|
||||
obs_property_float_set_suffix(p, " dB");
|
||||
p = obs_properties_add_int(ppts, S_ATTACK_TIME, TEXT_ATTACK_TIME, 0,
|
||||
10000, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
p = obs_properties_add_int(ppts, S_HOLD_TIME, TEXT_HOLD_TIME, 0, 10000,
|
||||
1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
p = obs_properties_add_int(ppts, S_RELEASE_TIME, TEXT_RELEASE_TIME, 0,
|
||||
10000, 1);
|
||||
obs_property_int_set_suffix(p, " ms");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return ppts;
|
||||
|
@@ -282,8 +282,11 @@ static obs_properties_t *noise_suppress_properties(void *data)
|
||||
{
|
||||
obs_properties_t *ppts = obs_properties_create();
|
||||
|
||||
obs_properties_add_int_slider(ppts, S_SUPPRESS_LEVEL,
|
||||
TEXT_SUPPRESS_LEVEL, SUP_MIN, SUP_MAX, 1);
|
||||
obs_property_t *p = obs_properties_add_int_slider(ppts,
|
||||
S_SUPPRESS_LEVEL,
|
||||
TEXT_SUPPRESS_LEVEL,
|
||||
SUP_MIN, SUP_MAX, 1);
|
||||
obs_property_int_set_suffix(p, " dB");
|
||||
|
||||
UNUSED_PARAMETER(data);
|
||||
return ppts;
|
||||
|
Reference in New Issue
Block a user