Skip to content
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

About "play sound" #891

Closed
hope366 opened this issue Jul 24, 2021 · 3 comments
Closed

About "play sound" #891

hope366 opened this issue Jul 24, 2021 · 3 comments

Comments

@hope366
Copy link

hope366 commented Jul 24, 2021

Applying #651, there is sound in the Windows environment, but it seems that there is no sound in Mac and Linux.
So there was a suggestion for #17, and I tried applying it, but there are still reports that there is no sound under the Mac environment. (Unknown about Linux)

There is an opinion that "/ sound" (absolute path from the root) is the cause, and "./sound" (relative path) may work.
I tried a little with my own wisdom, but it didn't work.
Could someone please fix it well?

@kaorahi
Copy link
Contributor

kaorahi commented Jul 24, 2021

This patch may help diagnosis by additional messages for sound errors.

--- a/src/main/java/featurecat/lizzie/util/Utils.java
+++ b/src/main/java/featurecat/lizzie/util/Utils.java
@@ -389,7 +389,14 @@ public class Utils {
       } catch (Exception e) {
         JOptionPane.showMessageDialog(
             Lizzie.frame,
-            resourceBundle.getString("Utils.playSound.noFileHint") + " \"" + wav + "\"");
+            resourceBundle.getString("Utils.playSound.noFileHint")
+                + " \""
+                + wav
+                + "\""
+                + "\n\n"
+                + e.getClass().getName()
+                + ": "
+                + e.getMessage());
         Lizzie.config.togglePlaySound();
         return;
       }

@hope366
Copy link
Author

hope366 commented Jul 24, 2021

Thank you for helping me solve the problem.
I'd like to use this immediately to see what kind of error message is displayed.

@hope366
Copy link
Author

hope366 commented Jul 24, 2021

The problem seems to have been resolved.
When starting lizzie, it seems that a problem occurred because the directory of lizzie was not set to the current directory.
java -jar lizzie / lizzie-0.7.4-shaded.jar
It seems that it failed by starting like this.
cd lizzie
java -jar lizzie-0.7.4-shaded.jar
It is said that the sound was produced safely by starting in this way.
I think your advice was helpful. Thank you very much.

@hope366 hope366 closed this as completed Aug 27, 2021
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