Java 类javax.sound.midi.MetaEventListener 实例源码

项目:Amber-IDE    文件:MidiAudio.java   
MidiAudio(InputStream data) throws MidiUnavailableException {
    getSequencer();
    setSequence(data);
    sequencer.addMetaEventListener(new MetaEventListener() {
        public void meta(MetaMessage msg) {
            if (msg.getType() == 47) {
                try {
                    sequencer.setSequence(sequence);
                } catch (InvalidMidiDataException e) {
                    ErrorHandler.alert(e);
                }
                sequencer.setTickPosition(0);
                if (loop) { // End of track                        
                    sequencer.start();
                }
            }
        }
    });

    AudioFormat base = new AudioFormat(44100, 16, 2, true, false);
    format = new AudioFileFormat(new Type("MIDI", "mid"), base, (int) (base.getFrameRate() * (sequence.getMicrosecondLength() / 1000000 + 4))).getFormat();
}
项目:openjdk-jdk10    文件:RealTimeSequencer.java   
@Override
public boolean addMetaEventListener(MetaEventListener listener) {
    synchronized(metaEventListeners) {
        if (! metaEventListeners.contains(listener)) {

            metaEventListeners.add(listener);
        }
        return true;
    }
}
项目:openjdk-jdk10    文件:RealTimeSequencer.java   
@Override
public void removeMetaEventListener(MetaEventListener listener) {
    synchronized(metaEventListeners) {
        int index = metaEventListeners.indexOf(listener);
        if (index >= 0) {
            metaEventListeners.remove(index);
        }
    }
}
项目:passage    文件:Player.java   
private void initSequencer()
{
    // Close the sequencer and synthesizer
    getSequencer().addMetaEventListener(new MetaEventListener() {
        public void meta(MetaMessage event)
        {
            if (event.getType() == 47)
            {
                close();
            }
        }
    });
}
项目:javify    文件:AlsaMidiSequencerDevice.java   
public boolean addMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub
  return false;
}
项目:javify    文件:AlsaMidiSequencerDevice.java   
public void removeMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub

}
项目:jvm-stm    文件:AlsaMidiSequencerDevice.java   
public boolean addMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub
  return false;
}
项目:jvm-stm    文件:AlsaMidiSequencerDevice.java   
public void removeMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub

}
项目:frinika    文件:FrinikaSequencer.java   
public boolean addMetaEventListener(MetaEventListener listener) {
    // TODO Auto-generated method stub
    return false;
}
项目:JamVM-PH    文件:AlsaMidiSequencerDevice.java   
public boolean addMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub
  return false;
}
项目:JamVM-PH    文件:AlsaMidiSequencerDevice.java   
public void removeMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub

}
项目:classpath    文件:AlsaMidiSequencerDevice.java   
public boolean addMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub
  return false;
}
项目:classpath    文件:AlsaMidiSequencerDevice.java   
public void removeMetaEventListener(MetaEventListener listener)
{
  // TODO Auto-generated method stub

}
项目:frinika    文件:FrinikaSequencer.java   
public void removeMetaEventListener(MetaEventListener listener) {
    // TODO Auto-generated method stub

}