IllegalArgumentException: Line unsupported

Skip to first unread message

Bernd Bausch

Oct 2, 2023, 10:11:13 AM10/2/23
to beadsproject
I am trying Beads with Processing (Windows 10) but can't even run the very first example sketch. The error is:

IllegalArgumentException: Line unsupported: interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian

In a thread from three years ago, Ollie suspects that "what Beads thinks is the default audio driver isn’t coming up as something that is usable". Which I don't really understand, but I can add the code from that thread to the sketch and obtain the list of mixers:

1) Port Headphones (Conexant ISST Audio --- Port Mixer
2) Port LG IPS FULLHD (インテル(R) ディスプレイ用オ --- Port Mixer
9) Headphones (Conexant ISST Audio) --- Direct Audio Device: DirectSound Playback
  - interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
  - interface Clip supporting 8 audio formats, and buffers of at least 32 bytes
16) Internal Microphone (Conexant I --- Direct Audio Device: DirectSound Capture
JavaSoundAudioIO: Chosen mixer is Port Headphones (Conexant ISST Audio.
AudioContext : no AudioIO specified, using default => beads.JavaSoundAudioIO.
JavaSoundAudioIO: Chosen mixer is Port Headphones (Conexant ISST Audio.

I would be very happy with the Port Headphones mixer, but it is not accepted. Actually, I use jsaio.selectMixer(...) to try all possible 16 mixers with the same negative result.

My guess is that I need to configure a different audio format, but which? and how? Or is the problem somewhere else?

Thanks in advance.

Oct 3, 2023, 1:30:25 AM10/3/23
to beadsproject

This is from a Processing sketch but try changing INTERFACE_NUMBER to 8 for however you're doing this.

Also with this, if you dont specify the Audio Context when you make UGens like I have in the WavePlayer constructor, it calls ac.getDefaultContext(), which might throw you to another audio interface. I think ac.setDefaultContext() is there for that.

import beads.*;

AudioContext ac; //physical hardware connection
WavePlayer wp;

void setup() {
  JavaSoundAudioIO jsaio = new JavaSoundAudioIO(512);
  //jsaio.printMixerInfo(); exit();//print from 1
  int INTERFACE_NUMBER = 18; //indexed from 0
  jsaio.selectMixer(INTERFACE_NUMBER); //indexed from 0
  IOAudioFormat ioFormat = new IOAudioFormat(44100, 16, 1, 1);
  ac = new AudioContext(jsaio, 512, ioFormat);
  wp = new WavePlayer(ac, 666, Buffer.TRIANGLE);


Bernd Bausch

Oct 7, 2023, 10:16:41 PM10/7/23
to beadsproject
Thanks, Kurt.

My problem is solved, thanks to your input, which prompted me to have another, closer look at my code. It turns out that I had not correctly set up the audio context.

Specifically, I had overlooked that new Audiocontext() required parameters. When I pass the jsaio object into the Audiocontext constructor (no further parameters required, but your example is still useful for future situations), it works.

Embarrassing, but I am glad I can continue learning about Beads now.
Reply all
Reply to author
0 new messages