0
我告訴他們我正在使用MIDlet,並且無法更改任何樂器MIDI通道。 我用.shortMidiEvent(0xC0 + channel, program, 0);
和setProgram(channel, -1, program)
嘗試沒有結果。我手機上的 是諾基亞X3-02樂器變化不起作用,只有midlet的仿真器。 這裏是代碼片段我無法更改JSR-135上的MIDI通道程序
public final class Dmgcpu implements Runnable {
private Player player;
private static MIDIControl synth;
private void initSound() {
try {
player = Manager.createPlayer(Manager.MIDI_DEVICE_LOCATOR);
player.prefetch();
synth = (MIDIControl) player.getControl("javax.microedition.media.control.MIDIControl");
} catch (Exception ex) {
}
synth.setProgram(0, -1, instSound_a);
//synth.shortMidiEvent(0xC0, instSound_a, 0);
//sound test
synth.shortMidiEvent(0x90 + channel, note[i], volume * MASTER_VOLUME);
thread_sleep(300);
synth.shortMidiEvent(0x80 + channel, note[i], 0);
}
是,你可以改變儀表,因爲我已經明白你在這樣的情況下使用的player
數組。我嘗試不工作。 saludos
手機崩潰與'預取();' – kapodamy