Hello World ! I have problem regarding background music in my 3D scene demo in openGL..anybody knows a simple source code to load audio files in openGL?

You can't. OpenGL is short for "Open Graphics Library"--all it does is graphics.

If you're looking for a cross-platform audio API that has a similar flavor, you might want to investigate OpenAL.

Well... For that type of thing I would use a library. irrklang is free to use for non-commerical stuff: http://www.ambiera.com/irrklang/

I've used it a little, it's a pretty cool library.

--edit--
I'm going to agree and say OpenAL is worth checking out.

If your project isn't being used for commercial purposes, I can't say enough about FMOD. I've used it in a few projects and it's extremely simple to get up and running and is license free.

If you want to write your own sound functionality from scratch, OpenAL is my suggestion as well.

If you are using sdl, then you can use sdl_mixer. But the suggested ones are openAL and FMOD

how much time needed to have a command over openAL ? ok, I will check the sufficient help for loading audio files in my project...but I want to learn it from scratch...Sometimes I read others source code..but I am worried about why this process didn't come in mah mind...have a feeling of rememorize it.. lot of questions in mah mind.."how ?" and "why ?"..if you have any idea about a tutorial ..plz post those links....thanks !!!

how much time needed to have a command over openAL ? ok, I will check the sufficient help for loading audio files in my project...but I want to learn it from scratch...Sometimes I read others source code..but I am worried about why this process didn't come in mah mind...have a feeling of rememorize it.. lot of questions in mah mind.."how ?" and "why ?"..if you have any idea about a tutorial ..plz post those links....thanks !!!

OpenAL doesn't seem too hard to me, but I came to it with a lot of background in sound processing and playback, so your mileage may vary.

I'm not aware of any basic tutorials, but the documentation by Creative Labs should be useful, especially the Programmer's Guide and the ALUT Manual.

can you tell me how to configure openAL in dev C++ ? As I have done some steps here it is...
1. I have included alut.h and al.h in c:\dev cpp\include\AL\
2. Inclusion of alut.dll in system folder(windows)
3. included openAL32.dll in system32 folder(windows)
4. linked all the files in linker option after making a project file(empty,c++) viz. -lalut -lopenal
5. there's a simple source code for Hello World
when I compile my project there's an error "cannot find -lopenal"
what's going wrong...

Perhaps try -lopenal32?

ya, I have laready done this- both wAYS
lopenal32 and lopenal as well. not working....I think this is a limitation of openAL not working in Dev Cpp

I think this is a limitation of openAL not working in Dev Cpp

I don't think so... it seems more like the linker simply can't find the library. Can you post your entire build output?

@gusano79-- ya,you are right , it was a problem regarding the library...I didn't included openAL32 (Object file library) in Dev Cpp's Lib folder, otherwise we will get a problem like "cannot find -lopenal32". Now the source code is compliling and executing as well....hey man ! thanks for the support !!! may ur aims and dreams come true..!!! happy journey !!!

I would like to thank to all of you for your guidence about openAL. Those who are suffering while configuring openAL in Dev Cpp. Follow my previous post and current post too.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.