de.gulden.framework.jjack
Class JJackAudioEvent.ChannelImpl

java.lang.Object
  extended by de.gulden.framework.jjack.JJackAudioEvent.ChannelImpl
All Implemented Interfaces:
JJackAudioChannel, JJackConstants
Enclosing class:
JJackAudioEvent

protected class JJackAudioEvent.ChannelImpl
extends java.lang.Object
implements JJackAudioChannel, JJackConstants

Inner class implementing interface JJackAudioChannel.

Version:
0.3
Author:
Jens Gulden

Field Summary
protected  JJackAudioPort in
          Input buffer.
protected  int index
          Index number of this channel.
protected  JJackAudioPort out
          Output buffer.
 
Fields inherited from interface de.gulden.framework.jjack.JJackConstants
INPUT, LEFT, OUTPUT, RIGHT
 
Constructor Summary
JJackAudioEvent.ChannelImpl(int index, java.nio.FloatBuffer in, java.nio.FloatBuffer out)
          Constructor.
 
Method Summary
 int getIndex()
          Returns the index number of this channel.
 JJackAudioPort getPort(int port)
          Returns the input or output port of this channel.
 java.nio.FloatBuffer getPortBuffer(int port)
          Returns the input or output buffer of this channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

protected int index
Index number of this channel.


in

protected JJackAudioPort in
Input buffer.


out

protected JJackAudioPort out
Output buffer.

Constructor Detail

JJackAudioEvent.ChannelImpl

JJackAudioEvent.ChannelImpl(int index,
                            java.nio.FloatBuffer in,
                            java.nio.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

getPort

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

Specified by:
getPort in interface JJackAudioChannel
Parameters:
port - either constant INPUT or OUTPUT
Returns:
the input or output port, as requested

getPortBuffer

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

Specified by:
getPortBuffer in interface JJackAudioChannel
Parameters:
port - either constant INPUT or OUTPUT
Returns:
the audio data buffer

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).

Specified by:
getIndex in interface JJackAudioChannel
Returns:
the index number of the channel