/[classpath]/classpath/gnu/javax/sound/midi/dssi/DSSISynthesizer.java
ViewVC logotype

Diff of /classpath/gnu/javax/sound/midi/dssi/DSSISynthesizer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by green, Fri Oct 7 15:49:03 2005 UTC revision 1.4 by green, Sat Oct 8 04:10:47 2005 UTC
# Line 239  public class DSSISynthesizer implements Line 239  public class DSSISynthesizer implements
239    static native String getProgramName_(long handle, int index);    static native String getProgramName_(long handle, int index);
240    static native int getProgramBank_(long handle, int index);    static native int getProgramBank_(long handle, int index);
241    static native int getProgramProgram_(long handle, int index);    static native int getProgramProgram_(long handle, int index);
242      static native void selectProgram_(long handle, int bank, int program);
243                
244    /**    /**
245     * @author Anthony Green (green@redhat.com)     * @author Anthony Green (green@redhat.com)
# Line 575  public class DSSISynthesizer implements Line 576  public class DSSISynthesizer implements
576      return false;      return false;
577    }    }
578    
579    /* (non-Javadoc)    /* @see javax.sound.midi.Synthesizer#loadInstrument(javax.sound.midi.Instrument)
    * @see javax.sound.midi.Synthesizer#loadInstrument(javax.sound.midi.Instrument)  
580     */     */
581    public boolean loadInstrument(Instrument instrument)    public boolean loadInstrument(Instrument instrument)
582    {    {
583      // TODO Auto-generated method stub      // FIXME: perhaps this isn't quite right.  It can probably
584      return false;      // be in any soundbank.
585        if (instrument.getSoundbank() != defaultSoundbank)
586          throw new IllegalArgumentException ("Synthesizer doesn't support this instrument's soundbank");
587          
588        Patch patch = instrument.getPatch();
589        selectProgram_(sohandle, patch.getBank(), patch.getProgram());
590        return true;
591    }    }
592    
593    /* (non-Javadoc)    /* (non-Javadoc)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26