Sound in Opengl

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Sound in Opengl

Post by herby490 »

I am looking to start learning opengl soon and I know that there is no sound in that library. I have been told that in order to get sound you need to use a separate program like openal. When I looked at openal i found out that you need to have the redistributable pack on a computer that you want to install a game on. Are there any other libraries that would be able to run sound with opengl or is their an easy way to get the redistributable on someones computer with the program besides having them download it themselves. Oh and should i learn SDL before opengl.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Sound in Opengl

Post by eatcomics »

sdl I do believe.... It can do sound and input stuff I think that's what most people do.... ;)
Image
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

Re: Sound in Opengl

Post by M_D_K »

OpenAL is a seperate library that mirrors OpenGL's design, and its pretty complicated. Since your starting out I'd recommend SDL_mixer.

EDIT: beat me to it ;)
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: Sound in Opengl

Post by Falco Girgis »

Yes, you should learn SDL before OpenGL, if you ask me.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Sound in Opengl

Post by dandymcgee »

I agree with everyone else, and SDL is great for sound (so I've heard).
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
herby490
Chaos Rift Regular
Chaos Rift Regular
Posts: 122
Joined: Thu Feb 12, 2009 5:59 pm

Re: Sound in Opengl

Post by herby490 »

So does anyone know a good book to start learning sdl
User avatar
PixelP
Chaos Rift Regular
Chaos Rift Regular
Posts: 153
Joined: Tue Oct 07, 2008 12:23 pm
Programming Language of Choice: c/c++
Location: sweden
Contact:

Re: Sound in Opengl

Post by PixelP »

focus on sdl is a good book.
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: Sound in Opengl

Post by RyanPridgeon »

I think you'd be better off using SDL for everything; SDL actually has an openGL wrapper, which means you can use openGL from inside SDL.

To get started, I highly recommend reading from http://lazyfoo.net/

When you start to get to grips with it, just use the SDL documentation and play around.

Have fun ;D
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
andrew
Chaos Rift Regular
Chaos Rift Regular
Posts: 121
Joined: Mon Dec 08, 2008 2:12 pm

Re: Sound in Opengl

Post by andrew »

Have a look at the links on this page from gamedev.net:

Simple DirectMedia Layer

Ernest Pazera is the author of Focus on SDL, and he has two articles at the bottom of the page.
Post Reply