• Advertisement
Sign in to follow this  
  • entries
    208
  • comments
    383
  • views
    65638

Java Sound

Sign in to follow this  

103 views

After working and working at getting a better SoundManager class I finally made one that works with the JLayer library. It has some better functionality such as playing at a given spot within a song, changing volume, and even crossfade between two sound clips.

There is still a minor issue with buffering the files before playing. Currently you do a SoundManager.play("somemusic.ogg",0,null) to play some music, but it takes some time to load the file from disk.

The answer is to make a SoundCache object which would take input like SoundCache.load("SomeMusic.ogg"); and then SoundManager.play(SoundCache.load("SomeMusic"),0,null); All I have to do now is implement it [smile]
Sign in to follow this  


1 Comment


Recommended Comments

And maybe implement some sort of max. number of cached sounds manager which frees the less used sounds. By the way, my (very small and basic) game console framework is done. Too bad you ain't using Java 5. :D

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement