且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

声音在java中 - 玩游戏时声音冻结

更新时间:2023-11-22 23:19:46

您可以启动一个线程来处理数据流的读取和写入。下面一起来看看:
我如何在Java中播放声音?

You could start a thread to handle the reading and writing of the streams. Take a look here: How can I play sound in Java?

举例code:

new Thread(new Runnable() {
  public void run() {
    Sound.playSound("Test.wav");
  }
}.start();