Multiple libraries sharing resources?

I’m currently working on a game in which I’m using SDL for its audio
capabilities. Specifically, I want to use smpeg for playing my digital
tracks which are currently MP3’s.

I also have sound effects which I would like to play using panning,
etc. I don’t know enough about SDL’s low-level audio library to
implement panning, and the higher-level mixer library doesn’t include
it. MikMod, however, includes panning.

So, I’m in a bit of a tight spot. Is it legal to use SDL only for
smpeg while using MikMod to play and pan waves? Or, can two separate
libraries not share the same resources within the same program, if
that makes any sense?

I also have sound effects which I would like to play using panning,
etc. I don’t know enough about SDL’s low-level audio library to
implement panning, and the higher-level mixer library doesn’t include
it. MikMod, however, includes panning.

Just to throw in my 2c:
I’d like to see the mixer include panning. :slight_smile:

-bill!
(want want want)

I’m currently working on a game in which I’m using SDL for its audio
capabilities. Specifically, I want to use smpeg for playing my digital
tracks which are currently MP3’s.

I also have sound effects which I would like to play using panning,
etc. I don’t know enough about SDL’s low-level audio library to
implement panning, and the higher-level mixer library doesn’t include
it. MikMod, however, includes panning.

So, I’m in a bit of a tight spot. Is it legal to use SDL only for
smpeg while using MikMod to play and pan waves? Or, can two separate
libraries not share the same resources within the same program, if
that makes any sense?

Yes, it’s completely legal.
The enhanced CVS version of the SDL example mixer library (available
at cvs.lokigames.com) supports MP3 music as well as mikmod playback.
It’s fairly trivial to add panning to a mixer. I whipped up a quick
prototype for some sound work here.

The basic principle is:
Take the relative amount of the sound that is on the left, and mix
that into the left channel, and take the inverse of that and mix it
into the right channel.

Hmm, that wasn’t very clear. Does anyone want to expand on that?
Bernd? :slight_smile:

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

“Sam” == Sam Lantinga writes:

Sam> Yes, it's completely legal.  The enhanced CVS version of the
Sam> SDL example mixer library (available at cvs.lokigames.com)
Sam> supports MP3 music as well as mikmod playback.  It's fairly
Sam> trivial to add panning to a mixer.  I whipped up a quick
Sam> prototype for some sound work here.

Hmm. Maybe I’m completely dense, but what’s the CVS root? :slight_smile: I hit
http://cvs.lokigames.com, but is there a faster way than clicking on
all the files in the mixer directory and downloading them one by one?
Sorry, I’m used to using the command line client, and never really
used CVSWeb, etc. for anything beyond browsing.

Hmm. Maybe I’m completely dense, but what’s the CVS root? :slight_smile: I hit
http://cvs.lokigames.com, but is there a faster way than clicking on
all the files in the mixer directory and downloading them one by one?
Sorry, I’m used to using the command line client, and never really
used CVSWeb, etc. for anything beyond browsing.

From the web page

http://www.devolution.com/~slouken/projects/SDL/download.html

Instructions for getting and building SDL via CVS:

cvs -d :pserver:guest at devolution.com:/home/slouken/cvsroot login

password is “cvsguest”

cvs -d :pserver:guest at devolution.com:/home/slouken/cvsroot checkout devel
cd devel/SDL; ./configure; make; make install

periodically run “make distclean; cvs update -d”

“Dave” == Dave Ashley (SDL list) writes:

Dave> http://www.devolution.com/~slouken/projects/SDL/download.html

I think that’s a completely separate CVS tree. I’m not interested in
that version; I’m interested in the CVS tree located at
cvs.lokigames.com (http://cvs.lokigames.com for more information.) The
instructions on the webpage above are used to grab the SDL/SDL-demos
pack which includes the old mixer which doesn’t mix MP3’s. The version
I need is in the other tree, the one for which I can’t find the
CVSROOT.

“Dave” == Dave Ashley (SDL list) writes:

Dave> http://www.devolution.com/~slouken/projects/SDL/download.html

I think that’s a completely separate CVS tree. I’m not interested in
that version; I’m interested in the CVS tree located at
cvs.lokigames.com (http://cvs.lokigames.com for more information.) The
instructions on the webpage above are used to grab the SDL/SDL-demos
pack which includes the old mixer which doesn’t mix MP3’s. The version
I need is in the other tree, the one for which I can’t find the
CVSROOT.

The information on the web page has been updated for the new CVS
repository. The CVS snapshot on the download page is also current.

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec