de.gulden.framework.jjack

Class JJackAudioEvent.ChannelImpl

protected class JJackAudioEvent.ChannelImpl extends Object implements JJackAudioChannel, JJackConstants

Inner class implementing interface JJackAudioChannel.

Version: 0.3

Author: Jens Gulden

Field Summary
protected JJackAudioPortin
Input buffer.
protected intindex
Index number of this channel.
protected JJackAudioPortout
Output buffer.
Constructor Summary
ChannelImpl(int index, FloatBuffer in, FloatBuffer out)
Constructor.
Method Summary
intgetIndex()
Returns the index number of this channel.
JJackAudioPortgetPort(int port)
Returns the input or output port of this channel.
FloatBuffergetPortBuffer(int port)
Returns the input or output buffer of this channel.

Field Detail

in

protected JJackAudioPort in
Input buffer.

index

protected int index
Index number of this channel.

out

protected JJackAudioPort out
Output buffer.

Constructor Detail

ChannelImpl

ChannelImpl(int index, FloatBuffer in, FloatBuffer out)
Constructor. Create a new instance of ChannelImpl with the given parameters.

Parameters: index index number of this channel in input buffer out output buffer

Method Detail

getIndex

public int getIndex()
Returns the index number of this channel. In stereo configurations (default), the returned value is either constant LEFT(=0) or RIGHT(=1).

Returns: the index number of the channel

getPort

public JJackAudioPort getPort(int port)
Returns the input or output port of this channel.

Parameters: port either constant INPUT or OUTPUT

Returns: the input or output port, as requested

getPortBuffer

public FloatBuffer getPortBuffer(int port)
Returns the input or output buffer of this channel. This is a convenience method for getPort(port).getBuffer().

Parameters: port either constant INPUT or OUTPUT

Returns: the audio data buffer