C++ Game Sounds, Cross Platform

Started by
2 comments, last by kop0113 10 years, 2 months ago

I'm starting to work on Sound for an engine I'm coding, and I'd like to ask for a general idea on what should I do.

1. Is there something like OpenGL for Audio? By "something" I mean something cross platform with few changes but support various platforms.

I've been looking for Audio equivalents of OpenGL and I found about OpenAL, but I'm not sure if it's exactly what I want. Most tutorials are over a decade old, and there's a bunch of topics mentioning it isn't continued/supported anymore. I've had this happen with OpenGL for me in the past, where I spent quite some time using OpenGL 1.0 or something only to find out nearly everything's different in OpenGL 4.0...

2. I found about a OpenAL Soft, but I couldn't find much about it since because of the name. Is this the "enhanced" version of OpenAL, and is it cross-platform?

3. After looking for some more, I found about this OpenSL ES, maintained by the same group of OpenGL, but it seems it's only for mobile devices and portables... or is there a desktop version I can use?

This seems to be the closest thing to OpenGL I could find of, but I couldn't find anything about using it for Windows.

By "something like" OpenGL I was looking for something that isn't a library ready for use, but an API that I would need to study and understand how sound is processed in the cards/drivers, and that I should develop my own functions/libraries to work with it.

Can someone provide me some updated information on this?

Advertisement

I haven't downloaded it or tried it yet, but PortAudio says it's open-source.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

I personally prefer SFML but you will also have to include the system module, which may be a good or a bad thing.

I use OpenAL soft (http://openal-soft.org/) because it is really portable between operating systems and requires few dependencies.

The "soft" part of it is because it is software rather than relying on hardware (unlike the original creative one). This is what makes it portable.

I usually use it with ogg/vorbis to load in the sound files. (akin to using libpng to load in image files for OpenGL to use).

This tutorial explains how to get a sound up and running: http://www.gamedev.net/page/resources/_/technical/game-programming/introduction-to-ogg-vorbis-r2031

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

This topic is closed to new replies.

Advertisement