Browse Source

libobs: Do not process panning if panning centered

Fixes a bug where audio panning would always be processed even if
panning was centered (and thus inactive).
jp9000 7 years ago
parent
commit
0951039322
1 changed files with 2 additions and 3 deletions
  1. 2 3
      libobs/obs-source.c

+ 2 - 3
libobs/obs-source.c

@@ -2656,9 +2656,8 @@ static void process_audio(obs_source_t *source,
 
 	mono_output = audio_output_get_channels(obs->audio.audio) == 1;
 
-	if ((!mono_output && source->sample_info.speakers == SPEAKERS_STEREO) ||
-			!(source->balance <= 0.51f &&
-			  source->balance >= 0.49f)) {
+	if (!mono_output && source->sample_info.speakers == SPEAKERS_STEREO &&
+	    (source->balance > 0.51f || source->balance < 0.49f)) {
 		process_audio_balancing(source, frames, source->balance,
 				OBS_BALANCE_TYPE_SINE_LAW);
 	}