Skip to content

javax.sound.sampled.LineUnavailableException / Little Endian #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
markuszeller opened this issue Mar 16, 2025 · 5 comments
Open

javax.sound.sampled.LineUnavailableException / Little Endian #107

markuszeller opened this issue Mar 16, 2025 · 5 comments

Comments

@markuszeller
Copy link

On any file like WAV or MP3 I got this error now on files which worked on previous versions.
Used on P5 4.3.4 on Windows 11.

javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.
	at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:484)
	at java.desktop/com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:115)
	at com.jsyn.devices.javasound.JavaSoundAudioDevice$JavaSoundInputStream.start(JavaSoundAudioDevice.java:273)
	at com.jsyn.engine.SynthesisEngine$EngineThread.run(SynthesisEngine.java:309)
java.lang.NullPointerException: Cannot invoke "javax.sound.sampled.TargetDataLine.read(byte[], int, int)" because "this.line" is null
	at com.jsyn.devices.javasound.JavaSoundAudioDevice$JavaSoundInputStream.read(JavaSoundAudioDevice.java:300)
	at com.jsyn.devices.javasound.JavaSoundAudioDevice$JavaSoundInputStream.read(JavaSoundAudioDevice.java:291)
	at com.jsyn.engine.SynthesisEngine$EngineThread.run(SynthesisEngine.java:330)
java.lang.RuntimeException: AudioInput stop attempted when no line created.
	at com.jsyn.devices.javasound.JavaSoundAudioDevice$JavaSoundInputStream.stop(JavaSoundAudioDevice.java:318)
	at com.jsyn.engine.SynthesisEngine$EngineThread.run(SynthesisEngine.java:357)
java.lang.NullPointerException: it must not be null
	at com.hamoid.Ffmpeg.stopFfmpegOnWindows(Ffmpeg.kt:110)
	at com.hamoid.Ffmpeg.endMovie(Ffmpeg.kt:76)
	at com.hamoid.VideoExport.dispose(VideoExport.kt:493)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1309)
	at processing.core.PApplet.handleMethods(PApplet.java:1456)
	at processing.core.PApplet.dispose(PApplet.java:3420)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:405)
NullPointerException: it must not be null
@markuszeller
Copy link
Author

I made it work to set my current audio playback device from 48khz down to 44.1khz. But the library should not depend on that.

@kevinstadler
Copy link
Collaborator

Could you please try calling MultiChannel.usePortAudio(); at the start of your setup() and report back, that should greatly increase compatibility for device bitrates

@markuszeller
Copy link
Author

Could you please try calling MultiChannel.usePortAudio(); at the start of your setup() and report back, that should greatly increase compatibility for device bitrates

Thank you for your advice. But this leads to:

RuntimeException: PortAudio is not supported on this operating system/architecture

@kevinstadler
Copy link
Collaborator

Ok that is interesting -- what kind of PC/CPU are you running this on?

@markuszeller
Copy link
Author

System Info said:

  • x64-based PC
  • Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz, 2592 MHz, 6 Cores, 12 logic processors
  • RAM 64 GB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants