Reputation: 1540
Is there an easy way to have multiple independent, concurrent consumers to an audio source (e. g. a microphone line) inside a single Java VM instance with Java's built-in audio framework (javax.sound.sampled.*
)? Since I'm using the audio processing library TarsosDSP anyway, can it be of help with that problem? Or do I need to implement my own audio mixer?
My current problem is, that I want to
Upvotes: 1
Views: 236
Reputation: 1540
I found some information, that partially answers my question:
1.3.2. How can I get more than one
TargetDataLine
?Current implementations of the Java Sound API do not support multiple
TargetDataLine
s for the same recording source. There are no plans to change this behaviour. If, in the future, multi-channel soundcards are supported, it may be possible to get differentTargetDataLine
instances for the different inputs. If you just want to "split" lines, do it in your application. See also Can I use multi-channel sound
So, that means, that at the time of writing, Java doesn't support multiple consumers on the same recording source and it likely won't be supported in the future. That leaves me to implement my own solution or find a library with an existing solution.
Upvotes: 1