Pārlūkot izejas kodu

TV: recover S/PDIF state

(cherry picked from commit f992f1028210191ec62328ea85d780685f0a560f)
Felix Paul Kühne 9 gadi atpakaļ
vecāks
revīzija
47f9dbb869
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      Sources/VLCPlaybackController.m

+ 6 - 0
Sources/VLCPlaybackController.m

@@ -517,6 +517,12 @@ NSString *const VLCPlaybackControllerPlaybackPositionUpdated = @"VLCPlaybackCont
             item = matches.firstObject;
             [self _recoverLastPlaybackStateOfItem:item];
         }
+#else
+        NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
+        BOOL bValue = [defaults boolForKey:kVLCSettingUseSPDIF];
+        if (bValue) {
+            [_mediaPlayer performSelector:@selector(setPassthroughAudio:) withObject:@(bValue)];
+        }
 #endif
     }