private void RefreshMixdownChoices() { HBMixdown oldMixdown = null; if (this.SelectedMixdown != null) { oldMixdown = this.SelectedMixdown.Mixdown; } this.mixdownChoices = new List <MixdownViewModel>(); HBAudioEncoder hbAudioEncoder = this.HBAudioEncoder; foreach (HBMixdown mixdown in Encoders.Mixdowns) { // Only add option if codec supports the mixdown if (Encoders.MixdownHasCodecSupport(mixdown, hbAudioEncoder)) { // Determine compatibility of mixdown with the input channel layout // Incompatible mixdowns are grayed out bool isCompatible = true; if (this.main.HasVideoSource) { AudioTrack track = this.GetTargetAudioTrack(); if (track != null) { isCompatible = Encoders.MixdownHasRemixSupport(mixdown, track.ChannelLayout); } } this.MixdownChoices.Add(new MixdownViewModel { Mixdown = mixdown, IsCompatible = isCompatible }); } } this.RaisePropertyChanged(() => this.MixdownChoices); this.SelectMixdown(oldMixdown); this.RaisePropertyChanged(() => this.SelectedMixdown); }