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) |
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) |