Re: OpenAL libXMP "passthrough"

Chris Robinson <[email protected]> Thu, 30 May 2013 14:01:37 -0700
Newsgroups gmane.comp.lib.openal
Message-ID <[email protected]>
On 05/29/2013 11:37 PM, [email protected] wrote:
> However, unlike libmikmod or FMod it is having no own direct output
> handling. The idea would be to use OpenAL for output since already
> initialized and working flawlessly, this would not only save a lot of
> overhead, it also reduces trouble especially in Linux on crappy
> soundcards which don't handle output from 2 different output sources
> very well (this problem got pretty much solved over the years bad I have
> bad memories on it yet).
> So what I need to basically just a way to say libXMP: play using output
> device OpenAL- some kind of output passthrough avoiding buffering or any
> other additionally existing function except maybe volume and frequency
> settings.
> So far I have no real idea yet how to do this, but maybe I just missed
> something yet.

It doesn't appear as though libXMP will play the module by itself. All 
it does is render the file to a PCM sample buffer, and the app is 
responsible for doing what it wants with it.

You can use OpenAL's buffer queues to stream the rendered samples from 
libXMP. This example:

http://devmaster.net/posts/2895/openal-lesson-8-oggvorbis-streaming-using-the-source-queue

show how to stream using libvorbisfile, but it should be easy to change 
the code to use libXMP instead.
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal