Playing sound portably with unix

  • Follow


What's the current wisdom on portably playing sound with a unix app?
I've done some searching but a lot of the information out there is very
old.

Initially I need to target Mandrake linux but it would be nice if the
software could port to FreeBSD and Solaris with little or no effort. So
ALSA or ESD may not be my best option. I quite like ESD's socket based
implementation though, and according to the FAQ it has been partly
ported to other platforms than linux. Is there anything else that works
in a similar-ish way and is a bit more portable?


-- 
Simon Elliott    http://www.ctsn.co.uk
0
Reply Simon 11/3/2005 10:17:59 AM

"Simon Elliott" <Simon at ctsn.co.uk> (05-11-03 10:17:59):

> What's the current wisdom on portably playing sound with a unix app?
> I've done some searching but a lot of the information out there is
> very old.


You might be interested in SDL (Simple DirectMedia Layer).  With it you
can do video output, audio output and other stuff portably, while not
losing any performance.  For audio, it transparently communicates with
the appropriate driver (ALSA, OSD, ESD, Arts, JACK, ...).  If necessary,
you can also specify the driver to use.

<http://www.libsdl.org/>

Regards.
0
Reply Ertugrul 11/4/2005 12:37:39 AM


On 04/11/2005, Ertugrul Soeylemez wrote:
> You might be interested in SDL (Simple DirectMedia Layer).  With it
> you can do video output, audio output and other stuff portably, while
> not losing any performance.  For audio, it transparently communicates
> with the appropriate driver (ALSA, OSD, ESD, Arts, JACK, ...).  If
> necessary, you can also specify the driver to use.
> 
> <http://www.libsdl.org/>


Thanks, this looks very interesting. 

How much have you used this product - can you comment on its maturity
and stability?

Looking at the licencing, we'd probably want to link dynamically - do
you know if the SDL_Init() call would load a DLL with W32 and
dynamically link the library with Linux?

-- 
Simon Elliott    http://www.ctsn.co.uk
0
Reply Simon 11/4/2005 4:32:28 PM

"Simon Elliott" <Simon at ctsn.co.uk> (05-11-04 16:32:28):

> How much have you used this product - can you comment on its maturity
> and stability?


I'm still using it very frequently.  It's both mature, stable and very
easy to deal with.


> Looking at the licencing, we'd probably want to link dynamically - do
> you know if the SDL_Init() call would load a DLL with W32 and
> dynamically link the library with Linux?


If you are going to write a closed-source product, then this is no
problem, because it's licensed under the _Lesser_ General Public
License, which means:  You may link it to non-GPL-compliant works.

However, it works as usual.  You can load the library either dynamically
or link it statically, where with dynamic loading you further have to
options:  loading it automatically (via linker) or manually (via a
system API).  In all three cases, by the time calling SDL_Init(), the
library must already be linked properly.  For static links or automatic
dynamic loading, you don't need to worry about this, but for manual
loading, you have to.

Regards.
0
Reply Ertugrul 11/5/2005 6:42:00 AM

On 05/11/2005, Ertugrul Soeylemez wrote:
> 
> However, it works as usual.  You can load the library either
> dynamically or link it statically, where with dynamic loading you
> further have to options:  loading it automatically (via linker) or
> manually (via a system API).  In all three cases, by the time calling
> SDL_Init(), the library must already be linked properly.  For static
> links or automatic dynamic loading, you don't need to worry about
> this, but for manual loading, you have to.

Thanks for the info.

As long as we don't use the graphics features, do you know if SDL would
work with an NT service app?

-- 
Simon Elliott    http://www.ctsn.co.uk
0
Reply Simon 11/5/2005 1:25:42 PM

4 Replies
137 Views

(page loaded in 0.113 seconds)

Similiar Articles:













7/26/2012 4:50:00 PM


Reply: