[…]
My application is written in Qt, and it seems SDL
results in some very weird behavior (for example Qt menus and buttons
will stop working at random points). Googling this, I discovered that
SDL uses some form of internal event loop and can’t be integrated easily
with GUI applications that provide their own event loop, which is a
shame since I only need SDL for sound, not graphics (I used Phonon
before, but it sucks hard.)
This is the standard problem whenever you want to mix two GUI toolkits,
or even things remotely similar to GUI toolkits… Most of them want
take over the application’s main loop and handle input and "dispatching"
themselves.
However, you should be able to use SDL audio without firing up the SDL
event system. SDL_Init(SDL_INIT_VIDEO) only, and you should be fine, I
think…
You probably meant “SDL_Init(SDL_INIT_AUDIO) only”.
Yes, of course! Cut’n’paste error…
Which is what I’m
doing, but there are still problems, especially on Mac OS X where SDL
wants to bring Cocoa into the application which is actually Carbon based.
Uh oh… Yeah, I figure that’s another conflict similar to the usual GUI
toolkit one. (I’m working on Linux, and have very limited experience with OS
X.)
Anyway, it seems SDL isn’t what I require in the first place: a
cross-platform audio decoding, mixing and playing library. Not that SDL
isn’t awesome in its own right; it’s just that it isn’t suitable it
seems for this use case. I only wish FMOD wasn’t closed source and a
pain in the bum to distribute.
How about PortAudio, or if you’re more into professional low latency audio,
RtAudio? Same kind of API as SDL audio, so no built-in mixer or anything, but
they shouldn’t pull in any dependencies beyond the pure audio stuff.On Thursday 15 April 2010, at 21.01.59, Nikos Chantziaras wrote:
On 04/15/2010 09:55 PM, David Olofson wrote:
–
//David Olofson - Developer, Artist, Open Source Advocate
.— Games, examples, libraries, scripting, sound, music, graphics —.
| http://olofson.net http://kobodeluxe.com http://audiality.org |
| http://eel.olofson.net http://zeespace.net http://reologica.se |
’---------------------------------------------------------------------’