Methods Summary |
---|
void | close()
nDeallocateBuffer(qsMIDI);
nClose(globMan, qsMIDI);
qsMIDI = 0;
|
boolean | fillBuffer(byte[] b)
boolean r = nFillBuffer(globMan, qsMIDI, b);
if(r)
{
if(loopCount != 0) nSetLoopCount(qsMIDI, loopCount);
}
return r;
|
abstract Control | getControl(java.lang.String controlType)
|
long | getDuration()
if(qsMIDI == 0) return Player.TIME_UNKNOWN;
return ((long)(nGetDuration(qsMIDI))) * 100L;
|
long | getMediaTime()
if(qsMIDI == 0) return Player.TIME_UNKNOWN;
return ((long)(nGetPosition(qsMIDI))) * 100L;
|
boolean | isDone()
boolean r = nIsDone(qsMIDI);
if(!r && (loopCount != 0))
currentLoopCount = nLoopsDone(qsMIDI);
return r;
|
private native void | nClose(int gm, int qsMpeer)
|
private native void | nDeallocateBuffer(int qsMpeer)
|
private native boolean | nFillBuffer(int gm, int qsMpeer, byte[] buffer)
|
private native int | nGetDuration(int peer)
|
private native int | nGetPosition(int peer)
|
private native boolean | nIsDone(int qsMpeer)
|
private native int | nLoopsDone(int qsMpeer)
|
private native int | nOpen(int gm)
|
private native void | nSetLoopCount(int peer, int count)
|
private native int | nSetPosition(int peer, int now)
|
private native void | nStart(int qsMpeer)
|
private native void | nStop(int qsMpeer)
|
int | numLoopComplete()
int numLoops = currentLoopCount - lastLoopCount;
lastLoopCount = currentLoopCount;
return numLoops;
|
boolean | open()
return open(false);
|
boolean | open(boolean forceOpen)
if(opened && !forceOpen)
return opened;
qsMIDI = nOpen(globMan);
opened = true;
return opened;
|
int | peer()
return qsMIDI;
|
Player | player()
return player;
|
void | setLoopCount(int count)
loopCount = count;
nSetLoopCount(qsMIDI, loopCount);
|
long | setMediaTime(long now)
if(qsMIDI == 0) return 0;
int pos = nSetPosition(qsMIDI, ((int)now/100));
return ((long)pos) * 100L;
|
void | setPlayer(Player p)
player = p;
|
void | start()
lastLoopCount = loopCount == -1 ? 0 : loopCount;
nStart(qsMIDI);
|
void | stop()
nStop(qsMIDI);
|