Example usage for android.media AudioFormat CHANNEL_OUT_QUAD

List of usage examples for android.media AudioFormat CHANNEL_OUT_QUAD

Introduction

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

Prototype

int CHANNEL_OUT_QUAD

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

Click Source Link

Usage

From source file:Main.java

public static int getOutFormat(int outChannels) {
    switch (outChannels) {
    case 1://w  w  w .  j  a va  2 s .c  om
        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);
    }
}