Exemplo n.º 1
0
        private void Obs_TransitionChanged(IOBSConnector sender, EOBSEvent eventtype)
        {
            if (eventtype == EOBSEvent.TransitionListChanged)
            {
                Midi.Display(EMidiOBSItemType.Transition, EMidiOBSOutputType.Off, -1);
            }

            int tr_i = 0;

            if (Obs.Transitions.Count > 0)
            {
                foreach (var tr in Obs.Transitions)
                {
                    if (Obs.ActiveTransition.Id == tr.Id)
                    {
                        Midi.Display(EMidiOBSItemType.Transition, EMidiOBSOutputType.Active, tr_i);
                    }
                    else
                    {
                        Midi.Display(EMidiOBSItemType.Transition, EMidiOBSOutputType.On, tr_i);
                    }
                    tr_i++;
                }
            }
        }
Exemplo n.º 2
0
        private async void _loadActiveScene(bool trigger_event, EOBSEvent eventType = EOBSEvent.SceneUpdated)
        {
            var scene = await ws.GetCurrentScene();

            for (int i = 0; i < Scenes.Count; i++)
            {
                if (Scenes[i].Name == scene.Name)
                {
                    Scenes[i]   = _translateScene(scene, i);
                    ActiveScene = _translateScene(scene, i);
                    if (trigger_event)
                    {
                        SceneChanged(this, eventType, Scenes[i]);
                    }
                }
            }
        }
Exemplo n.º 3
0
 private void Obs_AudioSourceChanged(IOBSConnector sender, EOBSEvent eventtype)
 {
     Midi.Display(EMidiOBSItemType.AudioItem, EMidiOBSOutputType.Off, -1, -1, true);
     for (int i = 0; i < Obs.AudioSources.Count; i++)
     {
         if (!Obs.AudioSources[i].Hidden)
         {
             if (Obs.AudioSources[i].Muted)
             {
                 Midi.Display(EMidiOBSItemType.AudioItem, EMidiOBSOutputType.Muted, i, -1);
             }
             else
             {
                 Midi.Display(EMidiOBSItemType.AudioItem, EMidiOBSOutputType.On, i, -1);
             }
         }
     }
 }
Exemplo n.º 4
0
 private void Obs_SceneChanged(IOBSConnector sender, EOBSEvent eventtype, SOBSScene scene)
 {
     // throw new NotImplementedException();
     if (eventtype == EOBSEvent.SceneAdded || eventtype == EOBSEvent.SceneRemoved)
     {
         if (EOBSEvent.SceneRemoved == eventtype)
         {
             Midi.Display(EMidiOBSItemType.Scene, EMidiOBSOutputType.Off, -1);
         }
         _renderScenes();
     }
     else if (eventtype == EOBSEvent.SceneSwitched || eventtype == EOBSEvent.SceneUpdated)
     {
         _renderScenes();
         _renderSceneItems();
     }
     Midi.FlushQueue();
 }
Exemplo n.º 5
0
 private void Obs_SceneItemChanged(IOBSConnector sender, EOBSEvent eventtype, SOBSSceneItem eventdata)
 {
     _renderSceneItems();
 }
Exemplo n.º 6
0
 private void Obs_SceneListChanged(IOBSConnector sender, EOBSEvent eventtype, List <SOBSScene> scenes)
 {
     _renderScenes();
     _renderSceneItems();
     Midi.FlushQueue();
 }
Exemplo n.º 7
0
 private void Obs_SourceChanged(IOBSConnector sender, EOBSEvent eventtype, SOBSSource eventdata)
 {
 }