ravi.joshi53's picture

How to integrate OpenAL with OpenGL using OpenTK


I am developing a game, in which i need to play a background music while the OpenTK engine renders the objects in screen. Also i need to play a music whenever mouse has been clicked over certain regions. (You can assume like a bullet sound whenever gun has been faced towards a man)

Currently I am following Playback.cs to play wav file.

OpenGL contains 4 basic method (Load, UpdateFrame, RenderFrame and Resize), by using these methods I am drawing the objects very well but I don't know how to work with OpenAL under OpenGL.

Please help me by providing the steps to integrate OpenAL with OpenGL using OpenTK. Sample code will be appreciated much. :)