|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groovemanager.spi.rex.NativeClass
com.groovemanager.spi.rex.REXHandle
This class is kind of a wrapper class vor the native REXHandle. All functions of the REX API that require a reference to a REXHandle instance are found in this wrapper class as member methods.
| Field Summary | |
|---|---|
private REXInfo |
info
An REXInfo object is stored with each REXHAndle so that only one call to the native function REXGetInfo() is needed per handle. |
| Constructor Summary | |
|---|---|
private |
REXHandle()
Private constructor will only be called from REXCreate() |
(package private) |
REXHandle(long pointer)
Create a new REXHandle that should be connected to an existing native instance specified by the given pointer. |
| 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) javax.sound.sampled.AudioInputStream |
getAudioInputStream()
Creates an AudioInputStream from this REXHandle |
(package private) static boolean |
isBigEndian()
|
private int |
jREXCreate(java.nio.ByteBuffer buffer)
|
private void |
jREXDelete()
|
private int |
jREXGetCreatorInfo(long infoPointer)
|
private int |
jREXGetInfo(long infoPointer)
|
private static int |
jREXGetInfoFromBuffer(java.nio.ByteBuffer buffer,
long infoPointer)
|
private int |
jREXGetSliceInfo(int sliceIndex,
long infoPointer)
|
private int |
jREXRenderPreviewBatch(int framesToRender,
java.nio.ByteBuffer left,
java.nio.ByteBuffer right)
|
private int |
jREXRenderSlice(int sliceIndex,
int bufferFrameLength,
java.nio.ByteBuffer left,
java.nio.ByteBuffer right,
boolean stereo)
|
private int |
jREXSetOutputSampleRate(int rate)
|
private int |
jREXSetPreviewTempo(int tempo)
|
private int |
jREXStartPreview()
|
private int |
jREXStopPreview()
|
(package private) static REXHandle |
REXCreate(java.io.File file)
Create a new REXHandle out of a REX file |
(package private) REXCreatorInfo |
REXGetCreatorInfo()
Get info about the author and copyright of the REX file represented by this handle |
(package private) REXInfo |
REXGetInfo()
Get general information about the REX file represented by this handle |
(package private) static REXInfo |
REXGetInfoFromBuffer(java.nio.ByteBuffer b)
The REX API provides this function for getting information about a REX file without creating a REXHandle from it |
(package private) REXSliceInfo |
REXGetSliceInfo(int index)
Get information about a specific slice inside this file |
(package private) static int |
REXPercentFinished()
|
(package private) void |
REXRenderPreviewBatch(int frames,
java.nio.ByteBuffer[] buffers)
Render one buffer of preview audio data. startPreview() must have been called before. |
(package private) void |
REXRenderSlice(int index,
int bufferFrameLength,
java.nio.ByteBuffer[] buffers)
Render the audio data of one slice to the specified buffer |
(package private) void |
REXSetOutputSampleRate(int rate)
Set the output sample rate at which the audio data should be rendered |
(package private) void |
REXSetPreviewTempo(int tempo)
Set the tempo in which the audio data should be rendered |
(package private) void |
REXStartPreview()
The REX API provides a preview mechanism for previewing REX files without rendering the different slices. |
(package private) void |
REXStopPreview()
Stop a previously started preview. |
| 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 |
|---|
private REXInfo info
| Constructor Detail |
|---|
private REXHandle()
REXHandle(long pointer)
pointer - | Method Detail |
|---|
protected void cleanUp()
NativeClass
cleanUp in class NativeClassprotected long createClass()
NativeClass
createClass in class NativeClass
javax.sound.sampled.AudioInputStream getAudioInputStream()
throws REXError
REXErrorstatic boolean isBigEndian()
private int jREXCreate(java.nio.ByteBuffer buffer)
private void jREXDelete()
private int jREXGetCreatorInfo(long infoPointer)
private int jREXGetInfo(long infoPointer)
private static int jREXGetInfoFromBuffer(java.nio.ByteBuffer buffer,
long infoPointer)
private int jREXGetSliceInfo(int sliceIndex,
long infoPointer)
private int jREXRenderPreviewBatch(int framesToRender,
java.nio.ByteBuffer left,
java.nio.ByteBuffer right)
private int jREXRenderSlice(int sliceIndex,
int bufferFrameLength,
java.nio.ByteBuffer left,
java.nio.ByteBuffer right,
boolean stereo)
private int jREXSetOutputSampleRate(int rate)
private int jREXSetPreviewTempo(int tempo)
private int jREXStartPreview()
private int jREXStopPreview()
static REXHandle REXCreate(java.io.File file)
throws REXError,
java.io.IOException
file - The REX file to create the handle for
REXError
java.io.IOException
REXCreatorInfo REXGetCreatorInfo()
throws REXError
REXErrorREXInfo REXGetInfo()
static REXInfo REXGetInfoFromBuffer(java.nio.ByteBuffer b)
throws REXError
b - A direct ByteBuffer containing the whole REX file data
REXError
REXSliceInfo REXGetSliceInfo(int index)
throws REXError
index - The zero-based index of the slice in question
REXErrorstatic int REXPercentFinished()
void REXRenderPreviewBatch(int frames,
java.nio.ByteBuffer[] buffers)
throws REXError
frames - The number of sample frames to renderbuffers - An Array of two direct ByteBuffers into which the data
should be rendered
REXError
void REXRenderSlice(int index,
int bufferFrameLength,
java.nio.ByteBuffer[] buffers)
throws REXError
index - The zero-based index of the slice which should be renderedbufferFrameLength - The length of the buffer in sample framesbuffers - An Array of two direct ByteBuffers into which the audio
data should be rendered
REXError
void REXSetOutputSampleRate(int rate)
throws REXError
rate - The new output sample rate
REXError
void REXSetPreviewTempo(int tempo)
throws REXError
tempo - The bpm multiplied with 1000. 123.456 is given as 123456
REXError
void REXStartPreview()
throws REXError
REXError
void REXStopPreview()
throws REXError
REXError
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||