jace icon indicating copy to clipboard operation
jace copied to clipboard

Could not output sound (javax.sound.sampled.LineUnavailableException)

Open lifepillar opened this issue 7 years ago • 2 comments

When I run Jace 2.0-Stable in macOS High Sierra, I get the following exception:

Allocated output lines: 0
Getting source line from Port Built-in Microphone, version Unknown Version: PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian
Aug 04, 2018 3:30:08 PM jace.apple2e.Speaker resume
SEVERE: ERROR: Could not output sound
javax.sound.sampled.LineUnavailableException: Line unsupported: interface SourceDataLine supporting format PCM_SIGNED 48000.0 Hz, 16 bit, stereo, 4 bytes/frame, big-endian
	at jace.core.SoundMixer.getNewLine(SoundMixer.java:186)
	at jace.core.SoundMixer.getLine(SoundMixer.java:152)
	at jace.apple2e.Speaker.resume(Speaker.java:173)
	at jace.apple2e.Speaker.attach(Speaker.java:306)
	at jace.core.Motherboard.reconfigure(Motherboard.java:127)
	at jace.apple2e.Apple2e.reinitMotherboard(Apple2e.java:130)
	at jace.apple2e.Apple2e.<init>(Apple2e.java:112)
	at jace.Emulator.<init>(Emulator.java:50)
	at jace.JaceApplication.start(JaceApplication.java:57)
	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:919)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(PlatformImpl.java:449)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

Aug 04, 2018 3:30:09 PM jace.apple2e.MOS65C02 reset
WARNING: Reset called, setting PC to (fffc) = fa62

Jace then appears to be running fine—except for sound, of course. Is there any setting that can be tweaked to get sound working, or is this a bug?

lifepillar avatar Aug 04 '18 12:08 lifepillar

My Java version:

java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

lifepillar avatar Aug 04 '18 12:08 lifepillar

I'm not sure about newer java versions. FWIW, I have a major rewrite of the sound cord underway which is on the backburner. The aim is to eliminate some of the lagginess caused by the JavaSound on the emulator as well as this kind of stuff. Stay tuned!

badvision avatar Nov 29 '18 18:11 badvision