bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.39k stars 1.56k forks source link

use recordSamples end with->Process finished with exit code 134 (interrupted by signal 6:SIGABRT) #2217

Open nocarethancare opened 2 months ago

nocarethancare commented 2 months ago

my version is 1.5.9

new Thread(()->{ while (!majorStreamActive.get()){ if(stopFlag)break; try { long s = System.currentTimeMillis(); log.info("=========audio======="); log.info("=========audio ok======="); long e = System.currentTimeMillis(); Thread.sleep(23); log.info("Using frame from ready stream (silent audio) initTime:"+(e-s)); ShortBuffer sBuf = ShortBuffer.allocate(1024); recorder.recordSamples(44100, 2, sBuf);

                  // recorder.record(silentAudioFrame);
               } catch (Exception e) {
                   throw new RuntimeException(e);
               }
           }
   }).start();

on the running. recorder.recordSamples(44100, 2, sBuf); will broken end. with (java) Process finished with exit code 134 (interrupted by signal 6:SIGABRT)