Forum

Sound API of choice

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

Sound API of choice

Postby Labman » Tue Feb 02, 2010 6:10 am

What is your sound API of choice? I'm looking into implementing sound into my game prototype engine but I'm not sure which API to look at...

Cross platform would be a big plus. Currently I'm using OpenGL and SDL, so I would like to keep my platform options open with the sound API too.
Labman
 
Posts: 62
Joined: Fri Nov 05, 2004 2:39 am
Location: Cambridge, United Kingdom

Postby c0burn » Tue Feb 02, 2010 6:49 am

c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England

Postby dreadlorde » Tue Feb 02, 2010 1:29 pm

I'm pretty sure on Linux you will need to do some crap with ALSA and/or OSS if you want sound. I don't think you can just send sound to /dev/dsp or where ever and have it play...
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.

Get off my lawn!
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby Spirit » Tue Feb 02, 2010 6:38 pm

That's why you simply use SDL and as a side effect get nice libraries for networking, input etc which are easily ported to Windows and the Mac too.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Postby c0burn » Tue Feb 02, 2010 9:03 pm

SDL has networking?
c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England

Postby Spike » Tue Feb 02, 2010 9:14 pm

the general recommendation for linux is to just use sdl for sound.
Reasoning: ALSA sucks more than the win3.1 api and has about as many bugs as there are stars in our galaxy. OSS is about as well supported as the win3.1 api, but does at least sound more like a farrari...
Really SDL is the most stress free and reliable way to get audio in linux. Be aware that it fills the output sound buffer in a separate thread, as required.
Using SDL gives you a quick and easy work around for all the bugs in the distribution's random choice of alsa version, or uses oss if the user knew how to install it and configure their system for it. It just magically works. Unlike ALSA.

I'm not personally aware of SDL having networking, but then I've never found BSD sockets to differ that much between the more important operating systems. You can generally just abstract the differences with a single header file and a few #defines.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Teiman » Tue Feb 02, 2010 9:55 pm

c0burn wrote:SDL has networking?


SDL is somewhat like DirectX, has lots of "expansions".. and one is SDL_net.
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby Labman » Wed Feb 03, 2010 1:18 am

I'm using SDL for window management and input currently, I was looking at it for sound but was wondering about other API's like openal might be a better choice.
Labman
 
Posts: 62
Joined: Fri Nov 05, 2004 2:39 am
Location: Cambridge, United Kingdom

Postby calvincolins » Fri Jul 02, 2010 7:28 am

Hey i think SDL for window management is work fine then why you want other API?
i think your current SDL is ok.
calvincolins
 
Posts: 3
Joined: Mon Jun 28, 2010 5:06 am

Postby revelator » Fri Jul 02, 2010 12:07 pm

SDL_sound ;)

bitch to compile though :lol:

but it hooks into openal ogg/vorbis etc. so plenty choices.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest