But worse, you have to load the same sound file multiple times on creation, about 4 seconds per sound it took for me, when you have lots of sounds it can take a while to load, and its just lame and wierd to hear all the sounds machine-gunning out when the game starts. Obviously this has complications because the size of the array is dependant on the length of the sounds, etc. I attempted to resolve this by loading an array of sound players that rotates as you play them, so by the time you get back to the first, the sound is finished. (which you hear)Even if you can tolerate this, it does not allow you to play the sound again until it finishes. One inelegent solution is to play every sound in the game when it loads up. The game stalling briefly evertytime a new sound plays just won't work. One method allows you to load a midi from a file, but a brief loading pause occurs the first time you play the sound. I have yet to find ANY workable solution to add sound effects to a game written in java.ĮVERY method i find has some offensive drawback or disadvantage that makes it unacceptable.
0 Comments
Leave a Reply. |