]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/applescript.m
macosx: fix resume playback guards, do not resume for folder urls
[vlc] / modules / gui / macosx / applescript.m
index c97951ab70937edd28c338aaa3a4c278ead3ab68..2d9273be73cda86aa7929bf72ceb888326586e72 100644 (file)
     [[VLCCoreInteraction sharedInstance] setVolume:(int)i_audioVolume];
 }
 
+- (int) audioDesync {
+    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    int i_delay = -1;
+
+    if(!p_input)
+        return i_delay;
+
+    i_delay = var_GetTime(p_input, "audio-delay");
+    vlc_object_release(p_input);
+
+    return (i_delay / 1000);
+}
+
+- (void) setAudioDesync:(int)i_audioDesync {
+    input_thread_t * p_input = pl_CurrentInput(VLCIntf);
+    if(!p_input)
+        return;
+
+    var_SetTime(p_input, "audio-delay", i_audioDesync * 1000);
+    vlc_object_release(p_input);
+}
+
 - (int) currentTime {
     input_thread_t * p_input = pl_CurrentInput(VLCIntf);
     int64_t i_currentTime = -1;