File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,16 @@ static inline void check_audio_output_source_is_monitoring_device(obs_source_t *
5858 strcmp (s -> info .id , "coreaudio_output_capture" ) == 0 ) {
5959 const char * dev_id = NULL ;
6060 obs_data_t * settings = obs_source_get_settings (s );
61+ bool is_pulse = strcmp (s -> info .id , "pulse_output_capture" ) == 0 ;
6162 if (settings ) {
6263 dev_id = obs_data_get_string (settings , "device_id" );
63- if (strcmp (dev_id , audio -> monitoring_device_id ) == 0 ) {
64+ bool id_match = strcmp (dev_id , audio -> monitoring_device_id ) == 0 ;
65+ if (is_pulse ) {
66+ // pulse may append '.monitor'
67+ size_t count = strlen (audio -> monitoring_device_id ) - 9 ;
68+ id_match = id_match || strncmp (dev_id , audio -> monitoring_device_id , count ) == 0 ;
69+ }
70+ if (id_match ) {
6471 audio -> prevent_monitoring_duplication = true;
6572 audio -> monitoring_duplicating_source = s ;
6673 if (!audio -> monitoring_duplication_prevented_on_prev_tick )
You can’t perform that action at this time.
0 commit comments