Example #1
0
        public DmpsAudioOutputController(string key, string name, Card.Dmps3OutputBase card)
            : base(key, name)
        {
            OutputCard = card;

            OutputCard.BaseDevice.DMOutputChange += new DMOutputEventHandler(BaseDevice_DMOutputChange);

            MasterVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Master);
            SourceVolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Source);

            if (card is Card.Dmps3ProgramOutput)
            {
                //(card as Card.Dmps3ProgramOutput).OutputMixer.MicLevel
                //TODO:  Hook up mic levels and mutes
                Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
                Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
            }
            else if (card is Card.Dmps3Aux1Output)
            {
                Codec2VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec2);
            }
            else if (card is Card.Dmps3Aux2Output)
            {
                Codec1VolumeLevel = new DmpsAudioOutput(card, eDmpsLevelType.Codec1);
            }
        }
Example #2
0
        static void SetUpDmpsAudioOutputJoins(BasicTriList trilist, DmpsAudioOutput output, uint joinStart)
        {
            var volumeLevelJoin = joinStart;
            var muteOnJoin      = joinStart;
            var muteOffJoin     = joinStart + 1;
            var volumeUpJoin    = joinStart + 2;
            var volumeDownJoin  = joinStart + 3;


            trilist.SetUShortSigAction(volumeLevelJoin, output.SetVolume);
            output.VolumeLevelFeedback.LinkInputSig(trilist.UShortInput[volumeLevelJoin]);

            trilist.SetSigTrueAction(muteOnJoin, output.MuteOn);
            output.MuteFeedback.LinkInputSig(trilist.BooleanInput[muteOnJoin]);
            trilist.SetSigTrueAction(muteOffJoin, output.MuteOff);
            output.MuteFeedback.LinkComplementInputSig(trilist.BooleanInput[muteOffJoin]);

            trilist.SetBoolSigAction(volumeUpJoin, output.VolumeUp);
            trilist.SetBoolSigAction(volumeDownJoin, output.VolumeDown);
        }