Skip to content

Tag: audio

Java Stop Sound Button Not Working Correctly

So I have been making a stop button recently and have been wondering how can I stop a button sound instantly when already playing. The problem : When you click the stop sound button, it only stops the next button you press. What Im Trying to Achieve : When you click the stop sound button, it stops all playing sounds.

Read OGG as stream of samples for LWJGL 3 OpenAL

I’m making a game with LWJGL 3, and for the first time I’m learning about the OpenAL library. I’m going to have to include long audio files, and I have decided that OGG will be used for the audio, since music would otherwise take up a lot of space. What I don’t know, though, is anything about how to get

Capturing speaker output in Java

Using Java is it possible to capture the speaker output? This output is not being generated by my program but rather by other running applications. Can this be done with Java or will I need to resort to C/C++? Answer I had a Java based app. that used Java Sound to tap into the sound flowing through the system to

Playing .mp3 and .wav in Java?

How can I play an .mp3 and a .wav file in my Java application? I am using Swing. I tried looking on the internet, for something like this example: But, this will only play .wav files. The same with: I want to be able to play both .mp3 files and .wav files with the same method. Answer Java FX