public FairlightAudioMixer GetFairlightAudioMixer() { if (_fairlightAudioMixer == null) { _fairlightAudioMixer = new FairlightAudioMixer(SwitcherDirect.GetFairlightAudioMixer(), _mediator); } return(_fairlightAudioMixer); }
public IEnumerable <Input> GetInputs() { if (_inputs == null) { var inputs = SwitcherDirect.GetInputs(); _inputs = new List <Input>(inputs.ToList().Select(c => new Input(c))); } return(_inputs); }
public StreamRTMP GetStreamRTMP() { if (_streamRTMP == null) { _streamRTMP = new StreamRTMP(SwitcherDirect.GetStreamRTMP(), _mediator); } return(_streamRTMP); }
public IEnumerable <DownstreamKey> GetDownstreamKeys() { if (_downstreamKeys == null) { var items = SwitcherDirect.GetDownstreamKeys(); _downstreamKeys = new List <DownstreamKey>(items.ToList().Select(c => new DownstreamKey(c, _mediator))); } return(_downstreamKeys); }
public IEnumerable <MixEffectBlock> GetMixEffectBlocks() { if (_mixEffectBlocks == null) { var items = SwitcherDirect.GetMixEffectBlocks(); _mixEffectBlocks = new List <MixEffectBlock>(items .ToList() .Select(c => new MixEffectBlock(this, c, _mediator))); } return(_mixEffectBlocks); }
/// <summary> /// Macros with a name in the system /// </summary> /// <remarks> /// Unlike other aspects that are fixed parts of the hardware, inputs, mix blocks etc., macros are /// dynamic and are retrieved on every call to this function. /// </remarks> /// <returns></returns> public IEnumerable <Macro> GetMacros() { var result = new List <Macro>(); if (_macroPool == null) { _macroPool = SwitcherDirect.GetMacroPool(); _macroPool.AddCallback(new MacroPoolCallback(_mediator)); } _macroPool.GetMaxCount(out uint maxCount); for (uint i = 0; i < maxCount; i++) { _macroPool.GetName(i, out string name); _macroPool.IsValid(i, out int valid); if (valid == 1 && !string.IsNullOrEmpty(name)) { _macroPool.GetDescription(i, out string description); result.Add(new Macro { Id = i, Name = name, Description = description }); } } return(result); }