Discussion:
OpenAL libXMP "passthrough"
d***@oldunreal.com
2013-05-30 06:37:22 UTC
Permalink
I'm using OpenAL quite a few years already in my project, so far with
libmikmod in the early beginnings and later with FMod. Libmikmod became
old and rarely maintained and FMod is having its restrictions due to be
closed source regarding portability to other archs like ARM, especially
the older Versions won't get any more support. I came across libXMP
which is maintained very well and it looks like a good successor for
libmikmod.
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.

Thanks,
Smirftsch
keghn
2013-05-30 20:12:22 UTC
Permalink
Hello.
I use Ubuntu and Mint 14.
I had to install with :

sudo apt-get install libxml2-dev

"./configure && make && sudo make install" did not work
after down loading, uncompressing. I got it from:

https://git.gnome.org/browse/libxml2/

I compiled the file in the "example" in a terminal with this line:

gcc -o gjobread `xml2-config --cflags` gjobread.c `xml2-config --libs`

And ran it with this line:

./gjobread

I do not know what it did because there is no visible feed back.

What I like about Openal its feed back are great.
But to be truthful I know nothing about XML.





--
View this message in context: http://openal.996291.n3.nabble.com/OpenAL-libXMP-passthrough-tp5498p5499.html
Sent from the OpenAL - User mailing list archive at Nabble.com.
Chris Robinson
2013-05-30 21:01:37 UTC
Permalink
Post by d***@oldunreal.com
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.
keghn
2013-05-30 23:23:22 UTC
Permalink
I got lesson 8 to work with:

g++ main.cpp ogg.cpp -lvorbis -lvorbisenc -lvorbisfile -lalut -lopenal -o
oggplayer


Did it from the command line.

To run it I used:

oggplayer stereo.ogg

make a great ogg player. Used Openal and vorbis only.



--
View this message in context: http://openal.996291.n3.nabble.com/OpenAL-libXMP-passthrough-tp5498p5502.html
Sent from the OpenAL - User mailing list archive at Nabble.com.
keghn
2013-05-30 23:27:15 UTC
Permalink
I mean I used:

./oggplayer stereo.ogg

This will run it on Mint 14 mate linux.



--
View this message in context: http://openal.996291.n3.nabble.com/OpenAL-libXMP-passthrough-tp5498p5503.html
Sent from the OpenAL - User mailing list archive at Nabble.com.
d***@oldunreal.com
2013-05-31 06:13:38 UTC
Permalink
Post by Chris Robinson
Post by d***@oldunreal.com
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
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.
I think that pretty much covers everything I need. Thanks

Loading...