@Override public boolean isActive () { return dataLine.isActive(); }
@Override public boolean isActive () { return dataLine.isActive(); }
@Override public boolean isActive () { return dataLine.isActive(); }
@Override public boolean isActive () { return dataLine.isActive(); }
/** * Used to determine if a channel is actively playing a source. This method * will return false if the channel is paused or stopped and when no data is * queued to be streamed. * @return True if this channel is playing a source. */ @Override public boolean playing() { switch( channelType ) { case SoundSystemConfig.TYPE_NORMAL: if( clip == null ) return false; return clip.isActive(); case SoundSystemConfig.TYPE_STREAMING: if( sourceDataLine == null ) return false; return sourceDataLine.isActive(); default: return false; } } }
private void killTheLine() { if(myOutputLine != null && myOutputLine.isOpen()) { if(myOutputLine.isActive()) { myOutputLine.stop(); } myOutputLine.flush(); myOutputLine.close(); } } }
private void ensureSourceDataLineIsReleased(){ if(sourceDataLine!=null) if(sourceDataLine.isOpen()){ if(sourceDataLine.isRunning() || sourceDataLine.isActive()) sourceDataLine.stop(); sourceDataLine.close(); } sourceDataLine=null; }//end ensureSourceDataLineIsReleased()
if( !sourceDataLine.isActive() ) sourceDataLine.start(); nextBuffer.cleanup();
private void setControlValue(FloatControl.Type type, float value) { FloatControl control = null; try { control = (FloatControl) line.getControl(type); } catch (Exception ex) { // Unsupported control type } if (control != null) { if (line.isActive()) { control.shift(control.getValue(), value, 50); } else { control.setValue(value); } } }
m_queueThread.setPriority(Thread.MAX_PRIORITY); m_queueThread.start(); while (m_queueThread.isAlive() && !m_line.isActive()) Thread.yield();
/** * @see io.github.amyassist.amy.core.audio.environment.AbstractAudioEnvironment#stop() */ @Override public void stop() { super.stop(); if (this.sdl.isActive()) { this.sdl.flush(); this.sdl.stop(); } if (this.tdl.isActive()) { this.tdl.flush(); this.tdl.stop(); } try { this.sdl.close(); } catch (RuntimeException e) {//NOSONAR // Needed because of a pulse audio bug, where close throws weird exceptions } try { this.tdl.close(); } catch (RuntimeException e) {//NOSONAR // Needed because of a pulse audio bug, where close throws weird exceptions } } }
return; if (!line.isActive()) { line.start();