I'm developing an app for my Nokia 6610 the first time and
got stuck in a very interesting problem:

I'm using the following function to load a wav-file:

private void loadSound()
InputStream tune;
tune = this.getClass().getResourceAsStream("/Bounce.wav");
soundBuffer = new byte[11069];
try {
tune.read(soundBuffer, 0, soundBuffer.length);
} catch (IOException e)
System.out.println("reading fine so far");
try {
sound = new Sound(soundBuffer, Sound.FORMAT_WAV);
} catch (IllegalArgumentException e)
System.out.println("Illegal argument - "+e);
sound.init(soundBuffer, Sound.FORMAT_WAV);

And although the function Sound.getSupportedFormats() returns
a 5 (FORMAT_WAV) too, the loading fails all the time.

On the Series 60 Emulator it works fine, but since my phone is
Series 40 I tried it on the Series 40 Emulator and on the Nokia 7210 emulator - both fail with an "IllegalArgumentExecption: invalid type".

One interesting thing: the trace output for the exception shows me that the loading fails in


but I'm loading a wav file not a ringing tone !

Thanks for any help