…I’m trying to convert my work to OpenAL. So far I’ve implemented an OpenAL version of Clip, which was fairly simple and works great (almost no latency anymore!).
Now I’m trying to find a way to implement streaming, for realtime audio generation. For example my arcade emulator needs this, but also my audio synthesis library I’m working on.
I basically need an equivalent to this (code coming from my arcade emulator in an update() method which is called every frame):
sourceDataLine.write(soundChip.getData(), 0, WRITE_BUF_SIZE * 2);
Very easy to do in JavaSound, but since JavaSound behaves very differently in every other version, it proved to be unusable. I’ve done enough tinkering with the sound code and now it doesn’t seem to work again on java5 so I’m finally scrapping JavaSound in favour of OpenAL.
I’ve looked on the internet, but found almost nothing about this, just an overcomplicated technique was discussed somewhere but without any code samples.
Has anybody already done this already and even have a code sample?
Yes I know, I’m a lazy bum ;D
