Revert "libobs: Don't return/set 0 mixers for non-audio sources"
This reverts commit 1df278997883512e40b853dc3651ef31de0ec9c3. This causes new sources to have their default mixer value overriden, reverting until a more ideal fix is approved
This commit is contained in:
parent
a0595ae45b
commit
49dad0a935
@ -4231,19 +4231,19 @@ void obs_source_set_audio_mixers(obs_source_t *source, uint32_t mixers)
|
||||
|
||||
if (!obs_source_valid(source, "obs_source_set_audio_mixers"))
|
||||
return;
|
||||
if ((source->info.output_flags & OBS_SOURCE_AUDIO) == 0)
|
||||
return;
|
||||
|
||||
if (source->audio_mixers == mixers)
|
||||
return;
|
||||
|
||||
if ((source->info.output_flags & OBS_SOURCE_AUDIO) != 0) {
|
||||
calldata_init_fixed(&data, stack, sizeof(stack));
|
||||
calldata_set_ptr(&data, "source", source);
|
||||
calldata_set_int(&data, "mixers", mixers);
|
||||
calldata_init_fixed(&data, stack, sizeof(stack));
|
||||
calldata_set_ptr(&data, "source", source);
|
||||
calldata_set_int(&data, "mixers", mixers);
|
||||
|
||||
signal_handler_signal(source->context.signals, "audio_mixers",
|
||||
&data);
|
||||
signal_handler_signal(source->context.signals, "audio_mixers", &data);
|
||||
|
||||
mixers = (uint32_t)calldata_int(&data, "mixers");
|
||||
}
|
||||
mixers = (uint32_t)calldata_int(&data, "mixers");
|
||||
|
||||
source->audio_mixers = mixers;
|
||||
}
|
||||
@ -4252,6 +4252,8 @@ uint32_t obs_source_get_audio_mixers(const obs_source_t *source)
|
||||
{
|
||||
if (!obs_source_valid(source, "obs_source_get_audio_mixers"))
|
||||
return 0;
|
||||
if ((source->info.output_flags & OBS_SOURCE_AUDIO) == 0)
|
||||
return 0;
|
||||
|
||||
return source->audio_mixers;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user