com.groovemanager.spi.rex
Class REXSliceInfo

java.lang.Object
  extended by com.groovemanager.spi.rex.NativeClass
      extended by com.groovemanager.spi.rex.REXSliceInfo

final class REXSliceInfo
extends NativeClass

This class is a wrapper class for the native REXSliceInfo struct. A REXSliceInfo instance contains information about one specific slice of a REX file

Author:
Manu Robledo

Field Summary
(package private)  REXHandle handle
          The REX handle to which this slice info belongs
(package private)  int index
          The zero-based index of this slice
(package private)  REXInfo info
          The REXInfo object from the handle
 
Constructor Summary
REXSliceInfo(long pointer, REXHandle handle, int sliceIndex)
          Create a new REXSliceInfo that is connected to an already existing native instance which is defined by the given pointer.
REXSliceInfo(REXHandle handle, int sliceIndex)
          Create a new REXSliceInfo instance.
 
Method Summary
protected  void cleanUp()
          Delete the corresponding native instance to this class
protected  long createClass()
          Create a new native instance and return its address
(package private)  int fPPQPos()
          The position of this slice inside the file in PPQ (Parts Per Quarter Note)
(package private)  int fSamplelength()
          The length of this slice in sample frames
(package private)  int sampleLengthTillNext()
          The length in sample frames between the beginning of this slice and either the beginning of the next slice or - if this is the last slice - the end of the file
(package private)  int samplePos()
          The position of this slice in sample frames
 
Methods inherited from class com.groovemanager.spi.rex.NativeClass
finalize, getPointer
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handle

final REXHandle handle
The REX handle to which this slice info belongs


index

final int index
The zero-based index of this slice


info

final REXInfo info
The REXInfo object from the handle

Constructor Detail

REXSliceInfo

REXSliceInfo(long pointer,
             REXHandle handle,
             int sliceIndex)
       throws REXError
Create a new REXSliceInfo that is connected to an already existing native instance which is defined by the given pointer.

Parameters:
pointer - The address of the native REXSliceInfo instance
handle - The REXHandle to which this slice info belongs.
sliceIndex - The zero-based index of the slice this info object belongs to.
Throws:
REXError - If handle.REXGetInfo() throws one.

REXSliceInfo

REXSliceInfo(REXHandle handle,
             int sliceIndex)
       throws REXError
Create a new REXSliceInfo instance. A new native instance will also be created.

Parameters:
handle - The REXHandle to which this slice info belongs.
sliceIndex - The zero-based index of the slice this info object belongs to.
Throws:
REXError - If handle.REXGetInfo() throws one.
Method Detail

cleanUp

protected void cleanUp()
Description copied from class: NativeClass
Delete the corresponding native instance to this class

Specified by:
cleanUp in class NativeClass

createClass

protected long createClass()
Description copied from class: NativeClass
Create a new native instance and return its address

Specified by:
createClass in class NativeClass
Returns:
The address of the new created native instance

fPPQPos

int fPPQPos()
The position of this slice inside the file in PPQ (Parts Per Quarter Note)

Returns:
The position of this slice inside the file

fSamplelength

int fSamplelength()
The length of this slice in sample frames

Returns:
The length of this slice in sample frames

sampleLengthTillNext

int sampleLengthTillNext()
The length in sample frames between the beginning of this slice and either the beginning of the next slice or - if this is the last slice - the end of the file

Returns:
The total length of this slice in sample frames including optional silence at the end

samplePos

int samplePos()
The position of this slice in sample frames

Returns:
The position of this slice in sample frames