Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
How to Add Sound to your code in opengl , can any one provide me with a tutorial link please

when i googled it shows to use openAL but i cant find how to use openAL and add a music file to my opengl code.

thank you
Posted

OpenGL is an Open Graphics Library, you don't use it to create audio.
OpenAL[^] is an Open Audio Library, and it is something you can use to do audio.

OpenAL Soft[^] is a cool implementation of the standard that is open.

It's related to OpenGL in the sense that it's a 3D audio API and OpenGL is (often) used to do 3D graphics, but they're two separate things doing different things.

Using GIT you can clone the OpenAL Sift repository from and you'll find example code in there.

Hope this helps,
Fredrik
 
Share this answer
 
why can't we use the
sndPlaySound("sound filename.extension",SND_ASYNC);


This simple and easy to get sound in OpenGL
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900