0

I did a Player that works fine, i used mediaplayer/wpf/c#, when i open mkv file i get all audio tracks playing together, how can i do a combo box from where i can choose what audio track to use?

I found information about AudioStreamCount and GetAudioStreamLanguage, but it's working only in metro app, is there something similar for Desktop Windows 8.1 application?

Metro app analogue:

private void PopulateAudioTracks(MediaElement media, ComboBox audioSelection)
    {
        if (media.AudioStreamCount > 0)
        {
            for (int index = 0; index < media.AudioStreamCount; index++)
            {
                ComboBoxItem track = new ComboBoxItem();
                track.Content = media.GetAudioStreamLanguage(index);
                audioSelection.Items.Add(track);
            }
        }
    }
MozzieMD
  • 355
  • 2
  • 12
  • Windows version? 7/8? – kennyzx Oct 13 '14 at 02:12
  • 1
    not an answer to your question... to me the most familiar media player is the `VLC Media Player`, it has a [C# interface](http://stackoverflow.com/questions/7382793/does-vlc-media-player-have-a-c-sharp-interface), providing much more features than the built in `MediaElement` control. – kennyzx Oct 14 '14 at 02:49
  • Ok thank you, i tried DirectX audiovideoPlayBack, but same problems, i will try vlc next! – MozzieMD Oct 14 '14 at 07:47

0 Answers0