libobs: Respect push to talk/mute status in volmeter
The audio capture callback's mute parameter internally respects the push to talk/mute state, whereas obs_source_muted() and the "mute" signal don't. This resulted in meters looking entirely unmuted even though both monitoring and output were not receiving audio.
This commit is contained in:
parent
8367c8adfa
commit
67dbb316a5
@ -535,7 +535,8 @@ static void volmeter_source_data_received(void *vptr, obs_source_t *source,
|
||||
|
||||
// Adjust magnitude/peak based on the volume level set by the user.
|
||||
// And convert to dB.
|
||||
mul = db_to_mul(volmeter->cur_db);
|
||||
mul = muted && !obs_source_muted(source) ? 0.0f
|
||||
: db_to_mul(volmeter->cur_db);
|
||||
for (int channel_nr = 0; channel_nr < MAX_AUDIO_CHANNELS;
|
||||
channel_nr++) {
|
||||
magnitude[channel_nr] =
|
||||
@ -552,7 +553,6 @@ static void volmeter_source_data_received(void *vptr, obs_source_t *source,
|
||||
signal_levels_updated(volmeter, magnitude, peak, input_peak);
|
||||
|
||||
UNUSED_PARAMETER(source);
|
||||
UNUSED_PARAMETER(muted);
|
||||
}
|
||||
|
||||
obs_fader_t *obs_fader_create(enum obs_fader_type type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user