OpenAL and Ogg Vorbis

Started by
3 comments, last by johnnyBravo 19 years, 10 months ago
Hi so far I know OpenAL lets you play wavs for sound effects, aswell it has a listener etc and can play ogg vorbis if setup with it. But what im wondering can Ogg Vorbis do sound effects just aswell as openal?, As i want to play sound effects and music in my game(resonably compressed music) thanks
Advertisement
quote:Original post by johnnyBravo
But what im wondering can Ogg Vorbis do sound effects just aswell as openal?, As i want to play sound effects and music in my game(resonably compressed music)


Ogg Vorbis is not a audio library in that it plays audio data. Rather it is an audio encoding/streaming technology.

Ogg Vorbis cannot be used on it''s lonesome; you''ll have to load the ogg encoded file, decode it, then send it to OpenAL. Then you can play it in your game.
MikeMJH - is right. Buth he hasen''t anwserd your question.
Yes you can!
You yust need to decode a file in to SounBuffer add efects & play.
Red Drake
In our game, we use OpenAL with SDL (and OpenGL). OpenAL to play .wav files and Ogg/Vorbis to play .ogg files. Works great =)

The game is open source, you can check it out here. Check out the AudioCore.

}-- Programmer/Gamer/Dreamer --{
I didn't choose to code, coding choose me.

[edited by - seriema on June 9, 2004 8:37:46 PM]
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
Ogg Vorbis isn''t something you use to play audio -- it''s the audio itself. Think of it as a smaller WAV (or better MP3, if you will). Whatever you can do on WAV with OpenAL, you can do on Vorbis, because you just load the Vorbis data and put it in the exact same buffer that you put the WAV file.


-- Fyhuang, president, Altitude Technologies

Altitude Technologies: http://www.hytetech.com/altitude
Altitude Forums: http://s8.invisionfree.com/Altitude_Forums/
- fyhuang [ site ]

This topic is closed to new replies.

Advertisement