Closed Gamebuster19901 closed 1 year ago
Actually, Object.finalize() is deprecated and removed (never called) in jdk 18.
We should be cleaning up using try/catch/finally or try with resources
I wanted to give GraalVM CE a try for our builds. This might be a good opportunity to test that and migrate to Java 19 at the same time. Do you want to set up the GraalVM action in our build workflows?
I wanted to give GraalVM CE a try for our builds. This might be a good opportunity to test that and migrate to Java 19 at the same time. Do you want to set up the GraalVM action in our build workflows?
I've never worked with that software so I wouldn't really be comfortable making a PR for it.
That's alright, then go ahead as planned 👍 thank you!
This is pretty much done, just needs testing to make sure sounds play and that the resources are properly relinquished.
I'll try to test it by the end of the week, been feeling sick lately.
Swift recovery to you then and thanks already 😊
I've just tested this PR and it seems that sounds are not played anymore with these changes.
Reproduced with utiLITI by adding a Sound source
and playing it directly within the editor.
Other than that: we had a quick discussion today about Java 19 and what it brings for us and we'd really like to give Project: Panama a try to approach our native dependencies differently. This could give us the opportunity to replace JNI for input and sound.
I've just tested this PR and it seems that sounds are not played anymore with these changes. Reproduced with utiLITI by adding a
Sound source
and playing it directly within the editor.
Can confirm. Not only does playing sounds not work, it also crashed my entire PC without error messages.
Can confirm. Not only does playing sounds not work, it also crashed my entire PC without error messages.
Yikes, I'll take a look
I'm unable to reproduce this when manually playing a sound:
try {
Game.audio().playSound(new Sound(new BufferedInputStream(new FileInputStream(new File("/home/gamebuster/Desktop/dolphinDump/Audio/example.mp3"))), "test"));
} catch (IOException | UnsupportedAudioFileException e) {
e.printStackTrace();
}
However, I am unable to add sounds at all using the editor, the dropdown doesn't show imported sounds.
However, I am unable to add sounds at all using the editor, the dropdown doesn't show imported sounds.
I fixed this yesterday with #772
I'm still unable to reproduce this issue.
Really appreciate the effort, thank you! I've rebased your branch onto master for testing locally. When I play a sound, a thread is spawned for the playback, I can't hear anything, and the thread is never closed. (The sound used in the examples below is only around one second long) Each new playback results in around 20% increased CPU load:
Also, I have verified that doing exactly the same thing on master works.
Sounds.zip These are two of the sounds I tried using (.ogg and .wav).
Maybe a Windows thing?
I'll try those out, I only used a .mp4 previously.
Issue fixed, ready for review.
No changes to the codebase are required.