Sound library -> get 2 different audio Inputs

Hi dears,
I’ve been using sound library to capture audio and check & visualize the FFT of an audio Input. I’m using windows10 and selecting my audio input from sound properties as is explained in this post ->getting-live-audio-input

I need to create another processing App in parallel capturing and analyzing FFT from another audio input source. But if I’ve to change this from windows setup I will not be able to have 2 APPs running with differents devices.

¿Any idea how to achive this?

Extra question:
What is really doing Audio In I’m not able setup different values from 0 or 1. And I’m using several audio devices connected.

Sound.list() returns “available audio devices and their number of input/output channels”.
It’s supposed to work If I choose any of them with Audio in?

Here my sound list output.
3- USB Audio CODEC is my primary audio input and I would like to be able to connect to others I need to connect to (3- USB Audio CODEC ) and NDI webcam input 1.

But Audio In as commented before only allow me 0 or 1. Anything else returns: java.lang.RuntimeException: Audio Input not configured in start() method.

device id 0: Port Speakers (3- USB Audio CODEC )
max inputs : 0
max outputs: 0
device id 1: Port default (Realtek Audio)
max inputs : 0
max outputs: 0
device id 2: Port NDI Webcam 2 (NewTek NDI Audio)
max inputs : 0
max outputs: 0
device id 3: Port Microphone (Realtek Audio)
max inputs : 0
max outputs: 0
device id 4: Port Microphone (WO Mic Device)
max inputs : 0
max outputs: 0
device id 5: Port NDI Webcam 3 (NewTek NDI Audio)
max inputs : 0
max outputs: 0
device id 6: Port NDI Webcam 1 (NewTek NDI Audio)
max inputs : 0
max outputs: 0
device id 7: Port Microphone (3- USB Audio CODEC
max inputs : 0
max outputs: 0
device id 8: Port NDI Webcam 4 (NewTek NDI Audio)
max inputs : 0
max outputs: 0
device id 9: Primary Sound Driver
max inputs : 0
max outputs: 2 (default)
device id 10: Speakers (3- USB Audio CODEC )
max inputs : 0
max outputs: 2
device id 11: default (Realtek Audio)
max inputs : 0
max outputs: 2
device id 12: Primary Sound Capture Driver
max inputs : 2 (default)
max outputs: 0
device id 13: Microphone (3- USB Audio CODEC )
max inputs : 2
max outputs: 0
device id 14: NDI Webcam 2 (NewTek NDI Audio)
max inputs : 2
max outputs: 0
device id 15: Microphone (Realtek Audio)
max inputs : 2
max outputs: 0
device id 16: Microphone (WO Mic Device)
max inputs : 2
max outputs: 0
device id 17: NDI Webcam 3 (NewTek NDI Audio)
max inputs : 2
max outputs: 0
device id 18: NDI Webcam 1 (NewTek NDI Audio)
max inputs : 2
max outputs: 0
device id 19: NDI Webcam 4 (NewTek NDI Audio)
max inputs : 2
max outputs: 0

Hi @carlesgutierrez.
Have you tried using inputDevice()

It may let you run two sketches on different audio devices.

1 Like

Yah! inputDevice() is what I needed. Thanks!
I’m using it as Documentation says, but still not working. I’ve checked if there are issues related to inputDevice but not for now. Is it working for you? In my case is not responding. Always getting the default audio input for all inputDevice numbers I’ve tried.

  //AUDIO
  Sound.list();
  s = new Sound(this);
  s.inputDevice(1);
  in = new AudioIn(this, 0);
  // start the Audio Input
  in.start();

I’m trying to select “device id 1: Port Speakers (3- USB Audio CODEC )” with id 1, but is using 0 one: “device id 0: Port default (Realtek Audio)”

Here my output: “Sound library error: audio device #1 has no input channels”

Hi

Try to test your inputs with other software and see the configuration and setting of your sound system

Hi @jafal I’ve tried with Arena Resolume and It works.

Scrutinize the list of devices you provided.
The list indicates if there are inputs or outputs available.
Only use devices with a inputs or outputs accordingly.

See Configuration section here:

I was able to run separate apps with different devices once they were configured properly.

:)

1 Like