use of javax.sound.sampled.LineEvent in project jdk8u_jdk by JetBrains.
the class SoftMixingClip method stop.
public void stop() {
LineEvent event = null;
synchronized (control_mutex) {
if (isOpen()) {
if (!active)
return;
active = false;
active_sg = true;
event = new LineEvent(this, LineEvent.Type.STOP, getLongFramePosition());
}
}
if (event != null)
sendEvent(event);
}
use of javax.sound.sampled.LineEvent in project jdk8u_jdk by JetBrains.
the class SoftMixingMixer method openStream.
public AudioInputStream openStream(AudioFormat targetFormat) throws LineUnavailableException {
if (isOpen())
throw new LineUnavailableException("Mixer is already open");
synchronized (control_mutex) {
open = true;
implicitOpen = false;
if (targetFormat != null)
format = targetFormat;
mainmixer = new SoftMixingMainMixer(this);
sendEvent(new LineEvent(this, LineEvent.Type.OPEN, AudioSystem.NOT_SPECIFIED));
return mainmixer.getInputStream();
}
}
use of javax.sound.sampled.LineEvent in project jdk8u_jdk by JetBrains.
the class SoftMixingSourceDataLine method close.
public void close() {
LineEvent event = null;
synchronized (control_mutex) {
if (!isOpen())
return;
stop();
event = new LineEvent(this, LineEvent.Type.CLOSE, getLongFramePosition());
open = false;
mixer.getMainMixer().closeLine(this);
}
if (event != null)
sendEvent(event);
}
use of javax.sound.sampled.LineEvent in project jdk8u_jdk by JetBrains.
the class SoftMixingSourceDataLine method stop.
public void stop() {
LineEvent event = null;
synchronized (control_mutex) {
if (isOpen()) {
if (!active)
return;
active = false;
event = new LineEvent(this, LineEvent.Type.STOP, getLongFramePosition());
}
}
if (event != null)
sendEvent(event);
}
use of javax.sound.sampled.LineEvent in project jdk8u_jdk by JetBrains.
the class SoftMixingSourceDataLine method start.
public void start() {
LineEvent event = null;
synchronized (control_mutex) {
if (isOpen()) {
if (active)
return;
active = true;
event = new LineEvent(this, LineEvent.Type.START, getLongFramePosition());
}
}
if (event != null)
sendEvent(event);
}
Aggregations