-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Reposted from #16:
Unfortunately, after a bunch of played sounds, it stops working. I tried if it is a special soundfile that does not work or a file after that it stops working, but nothing.
`Level initialized with level number: 1
Playing sound: START_GAME_SINGLE_ELEMENT from resource: files/575387__henrygillard__card-sounds.mp3
Playing sound: CLICK from resource: files/678248__pixeliota__mouse-click-sound.mp3
Playing sound: CONFIRM from resource: files/637109__ciapaqua__confirm_sound.mp3
Playing sound: CLICK from resource: files/678248__pixeliota__mouse-click-sound.mp3
Playing sound: CONFIRM from resource: files/637109__ciapaqua__confirm_sound.mp3
Exception in thread "DefaultDispatcher-worker-1" 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(Unknown Source)
at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.implOpen(Unknown Source)
at java.desktop/com.sun.media.sound.AbstractDataLine.open(Unknown Source)
at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.open(Unknown Source)
at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.open(Unknown Source)
at app.lexilabs.basic.sound.SoundBoard$startMixer$1.invokeSuspend(SoundBoard.kt:53)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:829)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@2978a3ca, Dispatchers.Default]`I found this librespot-org/librespot-java#41
where they sayThis exception usually means that the device is already in use.
Working since selecting another mixer (e. g. ALSA)
Crashes when preloading next track, probably because the mixer can't handle multiple lines at once.
The line causing the exception is
clip.open(format, byteArray, 0, byteArray.size)
Line 53, startMixer() in SoundBoard.kt