FileDocCategorySizeDatePackage
QSoundSynthPerformance.javaAPI DocphoneME MR2 API (J2ME)2458Wed May 02 18:00:46 BST 2007com.sun.mmedia

QSoundSynthPerformance

public class QSoundSynthPerformance extends Object

Fields Summary
private int
qsmPeer
private int
spPeer
private int
gmPeer
private int
tchnl
Constructors Summary
QSoundSynthPerformance()

        gmPeer = QSoundHiddenManager.getMIDIGlobalPeer();
        qsmPeer = nInitSynth(gmPeer);
        spPeer = nInitSynthPerformance(qsmPeer);
        
        tchnl = 0;        
    
Methods Summary
voidenableChannel(int channel, boolean enabled)

        nEnableChannel(spPeer, channel, enabled);
    
private native voidnEnableChannel(int peer, int channel, boolean enabled)

private native intnInitSynth(int gmPeer)

private native intnInitSynthPerformance(int qsmPeer)

private native voidnPlayTone(int peer, int note, int dur, int vol, int channel)

private native voidnWriteEventInt(int peer, int data, int tenthsMs)

voidplayTone(int note, int duration, int volume)


        // Implementation Note: Need to play on a channel that is not being used or reserve a channel for instant playtones.
        
        nPlayTone(spPeer, note, duration, volume, tchnl);
    
voidsetChannel(int channel)

        tchnl = channel;
    
voidwriteEvent(int data, int tenthsMS)

        nWriteEventInt(spPeer, data, tenthsMS);