Capture the soundcard's output?

后端 未结 1 494
小鲜肉
小鲜肉 2020-12-21 16:11

I\'m trying to get the data that the soundcard is outputting. Unfortunately, from my understanding of the Java Sound API, SourceDataLine does not support the read method, an

相关标签:
1条回答
  • 2020-12-21 16:42

    I've researched this a while, and determined any implementation using only java sound will not work with any reliability on multiple audio cards.

    There are a few solutions though. Hopefully one of these helps you.

    1. Bite the bullet, write some C++ code to allow this functionality on different operating systems.
    2. Use Java Sound to capture audio from a virtual audio recorder adapter which loops back the system audio output.
    3. Create a loopback yourself using cables to feed a sound output port into a sound input port.

    I recommend option 1 if you're developing this for a professional application as installation will be cleaner.

    Go with option 2 if you've a short amount of time, and you expect to spend more time with your users, or your users are tech savvy.

    Use option 3 if this is just a hobby, or some one-off project for a client.

    0 讨论(0)
提交回复
热议问题