Пример #1
0
        protected override void Update()
        {
            base.Update();

            if (!(Mixer is BassAudioMixer bassMixer))
            {
                return;
            }

            int[] channels = BassMix.MixerGetChannels(bassMixer.Handle);

            if (channels == null)
            {
                return;
            }

            foreach (int channel in channels)
            {
                if (mixerChannelsContainer.All(ch => ch.ChannelHandle != channel))
                {
                    mixerChannelsContainer.Add(new AudioChannelDisplay(channel));
                }
            }

            mixerChannelsContainer.RemoveAll(ch => !channels.Contains(ch.ChannelHandle));
        }
Пример #2
0
        protected override void Update()
        {
            base.Update();

            var channels = BassMix.MixerGetChannels(MixerHandle);

            if (channels == null)
            {
                return;
            }

            foreach (var channel in channels)
            {
                if (channelsContainer.All(ch => ch.ChannelHandle != channel))
                {
                    channelsContainer.Add(new AudioChannelDisplay(channel));
                }
            }

            channelsContainer.RemoveAll(ch => !channels.Contains(ch.ChannelHandle));
        }