com.sun.media.sound.ModelChannelMixer Java Examples
The following examples show how to use
com.sun.media.sound.ModelChannelMixer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestPreciseTimestampRendering.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #2
Source File: TestPreciseTimestampRendering.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #3
Source File: TestPreciseTimestampRendering.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #4
Source File: TestPreciseTimestampRendering.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #5
Source File: TestPreciseTimestampRendering.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #6
Source File: TestPreciseTimestampRendering.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #7
Source File: TestPreciseTimestampRendering.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #8
Source File: TestPreciseTimestampRendering.java From hottub with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #9
Source File: TestPreciseTimestampRendering.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #10
Source File: TestPreciseTimestampRendering.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #11
Source File: TestPreciseTimestampRendering.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #12
Source File: TestPreciseTimestampRendering.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #13
Source File: TestPreciseTimestampRendering.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public static Soundbank createTestSoundbankWithChannelMixer() { SF2Soundbank soundbank = createTestSoundbank(); SimpleSoundbank simplesoundbank = new SimpleSoundbank(); SimpleInstrument simpleinstrument = new SimpleInstrument() { public ModelChannelMixer getChannelMixer(MidiChannel channel, AudioFormat format) { return new ModelAbstractChannelMixer() { boolean active = true; public boolean process(float[][] buffer, int offset, int len) { for (int i = 0; i < buffer.length; i++) { float[] cbuffer = buffer[i]; for (int j = 0; j < cbuffer.length; j++) { cbuffer[j] = -cbuffer[j]; } } return active; } public void stop() { active = false; } }; } }; simpleinstrument.add(soundbank.getInstruments()[0]); simplesoundbank.addInstrument(simpleinstrument); return simplesoundbank; }
Example #14
Source File: SoftMainMixer.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
public void stopMixer(ModelChannelMixer mixer) { if (stoppedMixers == null) stoppedMixers = new HashSet<ModelChannelMixer>(); stoppedMixers.add(mixer); }
Example #15
Source File: SoftMainMixer.java From tuxguitar with GNU Lesser General Public License v2.1 | 4 votes |
public void registerMixer(ModelChannelMixer mixer) { if (registeredMixers == null) registeredMixers = new HashSet<ModelChannelMixer>(); registeredMixers.add(mixer); cur_registeredMixers = null; }