Jump to content
  • Advertisement
Sign in to follow this  

C++ Game Sounds, Cross Platform

This topic is 2068 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!