Example usage for android.media AudioFormat CHANNEL_OUT_7POINT1

List of usage examples for android.media AudioFormat CHANNEL_OUT_7POINT1

Introduction

In this page you can find the example usage for android.media AudioFormat CHANNEL_OUT_7POINT1.

Prototype

int CHANNEL_OUT_7POINT1

To view the source code for android.media AudioFormat CHANNEL_OUT_7POINT1.

Click Source Link

Usage

From source file:Main.java

public static int getOutFormat(int outChannels) {
    switch (outChannels) {
    case 1:// w  w w. j  ava2  s  .co  m
        return AudioFormat.CHANNEL_OUT_MONO;
    case 2:
        return AudioFormat.CHANNEL_OUT_STEREO;
    case 4:
        return AudioFormat.CHANNEL_OUT_QUAD;
    case 6:
        return AudioFormat.CHANNEL_OUT_5POINT1;
    case 8:
        return AudioFormat.CHANNEL_OUT_7POINT1;
    default:
        throw new IllegalArgumentException("illegal number of output channels: " + outChannels);
    }
}