|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.toot.audio.core.ChannelFormat
public abstract class ChannelFormat
ChannelFormat provides information about AudioBuffer channels. You can find out whether a channel index is left, right, center, front, rear or a low frequency extension (LFE) which is sufficient to describe mono, stereo, quad and 5.1, those formats being predefined as MONO, STEREO, QUAD and FIVE_1. You can find out which channel indices are left, right, center, front, rear and LFE. You can get the localised name for a channel index and for the format. You can mix a format with less channels to a format (upmixing). Odd formats like 1.1, 2.1, 3, 3.1 and 4.1 could be provided but are not believed to be significant enough to implement.
Field Summary | |
---|---|
static ChannelFormat |
FIVE_1
The default 5.1 ChannelFormat |
static ChannelFormat |
MONO
The Mono ChannelFormat |
static ChannelFormat |
QUAD
The default Quad ChannelFormat |
static ChannelFormat |
STEREO
The default Stereo ChannelFormat |
Constructor Summary | |
---|---|
ChannelFormat()
|
Method Summary | |
---|---|
abstract int |
getCenter()
Return the index of the center channel, if present, otherwise -1 |
abstract int |
getCount()
Return the number of channels in this format. |
abstract int[] |
getLeft()
Return an array of the indices of the left channels, may be empty but not null |
abstract int |
getLFE()
Return the index of the LFE channel, if present, otherwise -1 |
abstract java.lang.String |
getName()
Return the name of this ChannelFormat |
abstract java.lang.String |
getName(int chan)
Return the name of the specified channel |
abstract int[] |
getRight()
Return an array of the indices of the right channels, may be empty but not null |
abstract boolean |
isCenter(int chan)
Return true if chan is the index is of a center channel, false otherwise, undefined if chan is not a valid index |
abstract boolean |
isFront(int chan)
Return true if chan is the index is of a front channel, false otherwise, undefined if chan is not a valid index |
abstract boolean |
isLeft(int chan)
Return true if chan is the index is of a lefr channel, false otherwise, undefined if chan is not a valid index |
abstract boolean |
isLFE(int chan)
Return true if chan is the index is of an LFE channel, false otherwise, undefined if chan is not a valid index |
abstract boolean |
isRear(int chan)
Return true if chan is the index is of a rear channel, false otherwise, undefined if chan is not a valid index |
abstract boolean |
isRight(int chan)
Return true if chan is the index is of a right channel, false otherwise, undefined if chan is not a valid index |
int |
mix(AudioBuffer destBuffer,
AudioBuffer sourceBuffer,
float[] gain)
Mix a source AudioBuffer into a destination AudioBuffer with specified weights for each channel. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ChannelFormat MONO
public static final ChannelFormat STEREO
public static final ChannelFormat QUAD
public static final ChannelFormat FIVE_1
Constructor Detail |
---|
public ChannelFormat()
Method Detail |
---|
public abstract int getCount()
public abstract int getCenter()
public abstract int getLFE()
public abstract int[] getLeft()
public abstract int[] getRight()
public abstract java.lang.String getName()
public abstract boolean isCenter(int chan)
public abstract boolean isLeft(int chan)
public abstract boolean isRight(int chan)
public abstract boolean isFront(int chan)
public abstract boolean isRear(int chan)
public abstract boolean isLFE(int chan)
public abstract java.lang.String getName(int chan)
chan
- the index of a channelpublic int mix(AudioBuffer destBuffer, AudioBuffer sourceBuffer, float[] gain)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |