Example usage for android.media.tv TvTrackInfo getAudioChannelCount

List of usage examples for android.media.tv TvTrackInfo getAudioChannelCount

Introduction

In this page you can find the example usage for android.media.tv TvTrackInfo getAudioChannelCount.

Prototype

public final int getAudioChannelCount() 

Source Link

Document

Returns the audio channel count.

Usage

From source file:com.android.tv.MainActivity.java

private void saveMultiAudioSetting(String trackId) {
    List<TvTrackInfo> tracks = getTracks(TvTrackInfo.TYPE_AUDIO);
    if (tracks != null) {
        for (TvTrackInfo track : tracks) {
            if (track.getId().equals(trackId)) {
                TvSettings.setMultiAudioId(this, track.getId());
                TvSettings.setMultiAudioLanguage(this, track.getLanguage());
                TvSettings.setMultiAudioChannelCount(this, track.getAudioChannelCount());
                return;
            }/*from w ww.  ja v a 2  s  . c  o  m*/
        }
    }
    TvSettings.setMultiAudioId(this, null);
    TvSettings.setMultiAudioLanguage(this, null);
    TvSettings.setMultiAudioChannelCount(this, 0);
}