xspanger3770 / GlobalQuake

Experimental application for monitoring earthquakes world-wide in near real time. Capable of issuing its own earthquake early warnings (EEW).
MIT License
338 stars 52 forks source link

Failed to load sound: update.wav when starting both v0.10 and v0.11 #273

Open freejool opened 8 months ago

freejool commented 8 months ago
[11:17:00] WARN: globalquake.core.exception.FatalIOException: Failed to load sound: update.wav
        at globalquake.sounds.GQSound.load(GQSound.java:103)
        at globalquake.sounds.Sounds.loadSounds(Sounds.java:90)
        at globalquake.sounds.Sounds.load(Sounds.java:119)
        at globalquake.ui.client.MainFrame.initAll(MainFrame.java:87)
        at globalquake.ui.client.MainFrame.lambda$new$0(MainFrame.java:60)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 48000.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.DirectAudioDevice$DirectClip.implOpen(DirectAudioDevice.java:1241)
        at java.desktop/com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:115)
        at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1038)
        at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1134)
        at globalquake.sounds.GQSound.load(GQSound.java:100)
        ... 9 more

running on archlinux x86-64 with openjdk version "17.0.10" 2024-01-16

AyanamiJoss commented 8 months ago

Hello! Can you try converting the audio? You are supposed to put it in the address /.GlobalQuakeData/sounds (that folder is created when you run GlobalQuake for the first time), the audio format should be .wav, so you can look for a way to convert .mp3 to .wav effectively :)

freejool commented 8 months ago

but the sounds are in the .wav format already

➜  Downloads l .GlobalQuakeData/sounds
total 2.6M
drwxr-xr-x 1 sxing sxing  296 Apr  5 14:35 .
drwxr-xr-x 1 sxing sxing   32 Apr  5 14:35 ..
-rw-r--r-- 1 sxing sxing 167K Apr  5 14:35 countdown.wav
-rw-r--r-- 1 sxing sxing 192K Apr  5 14:35 eew_warning.wav
-rw-r--r-- 1 sxing sxing 192K Apr  5 14:35 felt_strong.wav
-rw-r--r-- 1 sxing sxing 539K Apr  5 14:35 felt.wav
-rw-r--r-- 1 sxing sxing 195K Apr  5 14:35 found.wav
-rw-r--r-- 1 sxing sxing 175K Apr  5 14:35 intensify.wav
-rw-r--r-- 1 sxing sxing 148K Apr  5 14:35 level_0.wav
-rw-r--r-- 1 sxing sxing 238K Apr  5 14:35 level_1.wav
-rw-r--r-- 1 sxing sxing 189K Apr  5 14:35 level_2.wav
-rw-r--r-- 1 sxing sxing 130K Apr  5 14:35 level_3.wav
-rw-r--r-- 1 sxing sxing 192K Apr  5 14:35 level_4.wav
-rw-r--r-- 1 sxing sxing  361 Apr  5 14:35 README.txt
-rw-r--r-- 1 sxing sxing 192K Apr  5 14:35 update.wav
➜  Downloads
freejool commented 8 months ago

Also, I can play the .wav file manually with vlc.

YacineBoussoufa commented 8 months ago

Try reconverting them again with online tools, it sees that the files use 48000Hz but your Java is unable to read them

freejool commented 8 months ago

Sorry I don't get you. How do I convert them again? They are originally wav files. I ran the jar with java -jar GlobalQuake-v0.11.0_pre-1.jar.

I'm trying to reduce the sample rate.

freejool commented 8 months ago

I'm trying to reduce the sample rate.

not working after converting to 44100Hz

➜  Downloads java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=23333 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=23333 -jar GlobalQuake-v0.11.0_pre-1.jar
[16:07:50] WARN: globalquake.core.exception.FatalIOException: Failed to load sound: update.wav
        at globalquake.sounds.GQSound.load(GQSound.java:103)
        at globalquake.sounds.Sounds.loadSounds(Sounds.java:90)
        at globalquake.sounds.Sounds.load(Sounds.java:119)
        at globalquake.ui.client.MainFrame.initAll(MainFrame.java:91)
        at globalquake.ui.client.MainFrame.lambda$new$0(MainFrame.java:64)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: 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.DirectAudioDevice$DirectClip.implOpen(DirectAudioDevice.java:1241)
        at java.desktop/com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:115)
        at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1038)
        at java.desktop/com.sun.media.sound.DirectAudioDevice$DirectClip.open(DirectAudioDevice.java:1134)
        at globalquake.sounds.GQSound.load(GQSound.java:100)
        ... 9 more
YacineBoussoufa commented 8 months ago

That's strange

freejool commented 8 months ago

Please ask if you need any information.

xspanger3770 commented 4 months ago

Someone was able to fix this issue by installing pulseaudio on Linux, so if anyone else is having this issue, you can try that.

freejool commented 4 months ago

On my system pulseaudio is in conflict with pipewire-pulse and pipewire-pulse is required by plasma-meta which I use for Desktop.

I'm not going to take the risk of breaking my system.