public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public JavaSoundAudioRecorder (int samplingRate, boolean isMono) { try { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, samplingRate, 16, isMono ? 1 : 2, isMono ? 2 : 4, samplingRate, false); line = AudioSystem.getTargetDataLine(format); line.open(format, buffer.length); line.start(); } catch (Exception ex) { throw new GdxRuntimeException("Error creating JavaSoundAudioRecorder.", ex); } }
public Microphone( float sampleRate, int sampleSize, boolean signed, boolean bigEndian) { AudioFormat format = new AudioFormat(sampleRate, sampleSize, 1, signed, bigEndian); try { line = AudioSystem.getTargetDataLine(format); line.open(); } catch (LineUnavailableException e) { throw new IllegalStateException(e); } inputStream = new AudioInputStream(line); }
try { targetDataLine = (TargetDataLine) AudioSystem.getLine(info); targetDataLine.open(audioFormat); } catch (LineUnavailableException e) { System.err.println("unable to get a recording line");
try { targetDataLine = (TargetDataLine) AudioSystem.getLine(info); targetDataLine.open(audioFormat); } catch (LineUnavailableException e) { System.err.println("unable to get a recording line");
try { targetDataLine = (TargetDataLine) AudioSystem.getLine(info); targetDataLine.open(audioFormat); } catch (LineUnavailableException e) { out("unable to get a recording line");
logger.info("open"); try { audioLine.open(finalFormat, audioBufferSize); } catch (LineUnavailableException e) { logger.severe("Can't open microphone " + e.getMessage());
try { targetDataLine = (TargetDataLine) AudioSystem.getLine(info); targetDataLine.open(audioFormat); } catch (LineUnavailableException e) { out("unable to get a recording line");
try { targetDataLine = (TargetDataLine) AudioSystem.getLine(info); targetDataLine.open(audioFormat); } catch (LineUnavailableException e) { out("unable to get a recording line");
try { targetDataLine = (TargetDataLine) AudioSystem.getLine(info); targetDataLine.open(audioFormat); } catch (LineUnavailableException e) { out("unable to get a recording line");
try { TargetDataLine mic = (TargetDataLine) AudioSystem.getLine(info); mic.open(audioFormat); mic.start(); input = new AudioInputStream(mic);
try { TargetDataLine mic = (TargetDataLine) AudioSystem.getLine(info); mic.open(audioFormat); mic.start(); input = new AudioInputStream(mic);
microphone.open(audioFormat, microphone.getBufferSize());
targetDataLine = (TargetDataLine) AudioSystem.getLine(lineInfo); targetDataLine.open(getAudioFormat()); Test.output("Target line opened:"); Test.output("Format requested: " + getAudioFormat());
out("AudioCommon.getTargetDataLine(): opening line..."); targetDataLine.open(audioFormat, nBufferSize); if (DEBUG) { out("AudioCommon.getTargetDataLine(): opened line");
out("AudioCommon.getTargetDataLine(): opening line..."); targetDataLine.open(audioFormat, nBufferSize); if (DEBUG) { out("AudioCommon.getTargetDataLine(): opened line");
out("AudioCommon.getTargetDataLine(): opening line..."); targetDataLine.open(audioFormat, nBufferSize); if (DEBUG) { out("AudioCommon.getTargetDataLine(): opened line");
out("AudioCommon.getTargetDataLine(): opening line..."); targetDataLine.open(audioFormat, nBufferSize); if (DEBUG) { out("AudioCommon.getTargetDataLine(): opened line");