コード例 #1
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   inProcessing = true;
   if (webServer != null) webServer.stop();
   audioLoop.ReleaseLoop();
   audioCapture.release();
 }
コード例 #2
0
        @Override
        public InputStream streaming(Properties parms) {
          if (audioLoop.isConnected()) {
            return null; // tell client is is busy by 503
          }

          audioLoop.InitLoop(128, 8192);
          InputStream is = null;
          try {
            is = audioLoop.getInputStream();
          } catch (IOException e) {
            audioLoop.ReleaseLoop();
            return null;
          }

          audioCapture.startRecording();
          AudioEncoder audioEncoder = new AudioEncoder();
          audioEncoder.start();

          return is;
        }