Where are all the openAL sources?


I would like to stream and play an .ogg file.

This seems possible with the StreamPlayer class. Huh, but where can i find this class?

Where is the class + source com.jmex.sound.openAL.objects.util.StreamPlayer??

I know about this class from the API http://www.jmonkeyengine.com/doc/.

I think the class you are looking for is in the jME 2.0 source named:

com.jmex.audio.AudioTrack.StreamedAudioPlayer … but it is abstract. The best place to look for examples on how to play audio, is the jmetest package in the source. Especially these 2 classes:



I am not sure how often the javadocs are updated, bu it certainly still points to jME 1.0, not 2.0.

Thank you.

Well, I'm using jME 1.0. and the examples are good but they are not what I am looking for.

The question remains: Where are all the openAL sources which are listed in the API. No matter to witch version it belongs to I would like to see and use the class.

I would like to stream an ogg file.

Maybe someone can give me an example for how to do this or I will be forced to do it by my own with samples, PCM and stuff like that.

Any help is appreciated.

Update: I found another class which can stream files:


I will give feedback if it works and how provided that the class exists at all.

Well let's take another look… In TestMusicQueue we have the command:

AudioTrack track = AudioSystem.getSystem().createAudioTrack(
               "jmetest/data/sound/Footsteps.wav"), false);

now I realize that it says clearly 'wav' there, but the audio format is automatically detected depending on what you input. This is done in the com.jmex.audio.util.AudioLoader class. Also streaming is specified in this very command - the last parameter which in this example is set to 'false', can be used to specify a streaming play, and avoid loading the entire data into memory. You can see the implementation of this createAudioTrack method in the com.jmex.audio.openal.OpenALSystem class. (This is all v2.0)

I am happy you are OK with the jme 2.0 version of the code... no need to search for the same stuff twice :) Anyways what is it exactly what you would like to see about streaming an ogg file that you feel is missing from the above examples? They show how to play an ogg file.. and do it by streaming. If you feel that they do not do that (I must admit I have not really tested that feature myself), perhaps it is necessary to raise an issue or report it as a bug.

BTW, you should only use streaming for music tracks. There were some problems with it, especially when you need instant playback (such as sound effects), it's best to load the audio files and cache them, rather than stream them.