In my 6600 game I am loding 4 wav file to the game.
if I load 1 file there is no proglem. but try to load more than 1 file
; when the midlet start, there comes a little sound but in game there is no problem. Only the beginning of the game this sounds comes.
this s my code;
How can I load more than 1 wav file and play?
////////////////////////////////////////////////////////////////////////
InputStream tune =
this.getClass().getResourceAsStream("/sounds/davul.wav");
byte[] buf = new byte[100000];
tune.read(buf, 0, buf.length);
davul = new Sound(buf, Sound.FORMAT_WAV);
davul.init(buf, Sound.FORMAT_WAV);
}
catch (Exception e) {
e.printStackTrace();
}
try{
InputStream tune2 = this.getClass().getResourceAsStream("/sounds/para_alma.wav");
byte[] buf2 = new byte[100000];
tune2.read(buf2, 0, buf2.length);
para_alma = new Sound(buf2, Sound.FORMAT_WAV);
para_alma.init(buf2, Sound.FORMAT_WAV);
}
catch (Exception e) {
e.printStackTrace();
}
try{
InputStream tune3 = this.getClass().getResourceAsStream("/sounds/terlik_carpma.wav");
byte[] buf3 = new byte[100000];
tune3.read(buf3, 0, buf3.length);
terlik_carpma = new Sound(buf3, Sound.FORMAT_WAV);
terlik_carpma.init(buf3, Sound.FORMAT_WAV);
}
catch (Exception e) {
e.printStackTrace();
}
try{
InputStream tune4 = this.getClass().getResourceAsStream("/sounds/saksi_kirilma.wav");
byte[] buf4 = new byte[100000];
tune4.read(buf4, 0, buf4.length);
saksi_kirilma = new Sound(buf4, Sound.FORMAT_WAV);
saksi_kirilma.init(buf4, Sound.FORMAT_WAV);
}
catch (Exception e) {
e.printStackTrace();
}
/////////////////////////////////////////////////////