is part of javax.sound.sampled. I can't recall how Paul has us load sounds. It's been a couple years since I looked at his library. I've just been using methods based on javax.sound.sampled.
I've been wondering, too, how to do what you are asking about, using LWJGL or LibGDX. My system is too slow to implement Android emulation, so I haven't tested sound coding in that context. But I also wonder if LWJGL & Libgdx make use of javax.sound.sampled for their implementation. I recall someone writing somewhere that this was true, but my memory is shaky and I could have it totally wrong.
Looking at this tutorial: http://www.lwjgl.org/wiki/index.php?title=OpenAL_Tutorial_1_-_Single_Static_Source
something called WaveData
is used for loading a sound. By its syntax, it seems to me you could load either from within the jar or not, according to the usual rules of addressing files. But I haven't tested it.
InputStream has requirements for the file (e.g., Marking, Resetting) that are usually not met by audio data files.
I'm assuming you just meant input streaming in a general sense, weren't referring to the specific Java class InputStream.
InputStream methods mark() and reset() only have to provide their described functionality, if markSupported() returns true, which by default it does not.
Ah, I was being sloppy. Further clarifying, according to the comments in the api for AudioSystem.getAudioInputStream(InputStream inputStream) http://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/AudioSystem.html#getAudioInputStream%28java.io.InputStream%29
, this method for loading a file may
or may not
run the tests Riven mentions. For this reason, I use a URL for the input parameter instead of an InputStream. But some folks prefer to wrap the InputStream in a BufferedInputStream, and this also works.