openAL, QuickTime, or Core Audio?

Lord Vader
Unregistered
 
Post: #1
What should i do for my music and sound affects in my game? Core Audio, QT or OpenAL?

And if any one knows of some tutorials for them please let me know.

Thanks,
Lord Vader
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
Nobody seems to know how CoreAudio works. OpenAL is very easy for sound effects. QuickTime is very easy for music, but probably useless for sound effects.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #3
If you want something really easy with a good amount of features, documentation, and even an example project, check out the free open source SqueakLib:

http://www.tc.umn.edu/~czec0035/files/Sq...2.1.tar.gz

I think it'd fit your needs well. You could just use that and move on to more important matters. Not that it should make much of a difference to you, but it is using QuickTime for loading and the old Sound Manager for playing.

-Jon
Quote this message in a reply
Member
Posts: 321
Joined: 2004.10
Post: #4
I vote for openAL. I was able to get sound effects working within
my application within about 2 days. Frustration factor was almost
zero. And that was starting from scratch. It's even patterned after
openGL.

I wrote a simple test application where I have me and 3
members each sing "row row row your boat" Then I had the
4 samples looped and staggered. Yes, it was cheesy but it showed me
that I could stagger, overlay, and loop samples. I used wav files. Couldn't
get any other format to work, but I believe it was PC site that had the
openAL demo.
Quote this message in a reply
Member
Posts: 198
Joined: 2005.01
Post: #5
I started out with CoreAudio in my OSX stuff. It was pretty easy to get streaming going with it, once I was able to distill the pieces I needed out of the Apple samples. Getting one-shot samples to play was painful enough that I gave up and used SoundManager. But that combo was causing me weird crashes (and I had no Windows audio either) so I just switched everything to OpenAL. Besides a little bit of difficulty on the Windows side, I've had no issues with OpenAL at all.

The only real caveat is that unless you want to make your game Tiger-specific you'll have to build and ship an embedded OpenAL in your game.

Oh, also be aware that you'll probably have to endian-swap your samples for streams depending on the platform (Intel Mac vs Intel PC vs PPC Mac). OpenAL seems to expect "native" byte order for 16-bit samples.

Cryptic Allusion Games / Cryptic Allusion, LLC
http://www.cagames.com/
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #6
I use FFMOD Personally, I think thats what its called its been a while since i worked with sounds =p

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #7
I started looking at quicktime and i also looked at openal. When i looked at quicktime every thing was fine exept i didnt know how to open a file Blush.
So then i had to start looking at suff like Navigation something and resourcer and bunches of other stuff, and bow Ive got myself into a big mess with all the opening resources and files Sad. I know this is off topic but any help with resources and file opening would be nice...

Thanks,
Lord Vader
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #8
Really, start small. Start SqueakLib.

To be blunt, honest, but utterly helpful, a beginner will need about all the help they can get starting off. You've got the rest of developing a game to worry about.

-Jon
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #9
aarku, your probably wright. Ill look into that sqeakLib. Would very nice to not stay up tilll three in the morning reading pages of stuff just to find out theres some other API i have to learn. I probably should just try smaller steps by using the easier stuff first and then later try to learn one of the bigger APIs, ext later.

Thanks for all the ideas.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #10
Lord Vader Wrote:aarku, your probably wright. Ill look into that sqeakLib. Would very nice to not stay up tilll three in the morning reading pages of stuff just to find out theres some other API i have to learn. I probably should just try smaller steps by using the easier stuff first and then later try to learn one of the bigger APIs, ext later.

Thanks for all the ideas.

You should also invest in a dictionary and/or a English grammar book.

anyways, Microbian: Fighter uses Quicktime for music. It took about 20-30 lines to set up looping, track switching, and proper song selections. Really easy stuff.

OpenAL can be a real bother. It is simple enough to play a sound, but for the life of my, 2D or 3D positional audio with or without the doppler effect was impossible to get working properly. It is probably a fault on my part, but for the life of me, I could not get my audio environment to match my GL environment (which is ultimately what you are going for)
My OpenAL wrapper class is only about 200 lines for header and implementation.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #11
Hmm, I had no problem getting 3D sound without doppler working just fine. Doppler took a couple of hours of futzing to figure out the problems of scale, but it works fine now...
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #12
And that is why we kneel down before you OSC.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
themacman13
Unregistered
 
Post: #13
skyhawk Wrote:You should also invest in a dictionary and/or a English grammar book.

anyways, Microbian: Fighter uses Quicktime for music. It took about 20-30 lines to set up looping, track switching, and proper song selections. Really easy stuff.
...
1."a" should be capitalized
2. "It" is a pronoun without an antecedent
3. "Really easy stuff," is not a complete sentence

Nobody is perfect.

I'm just messing with you. Rasp

However, Skyhawk is right Lord Vader. It helps to phrase sentences so that others can read them. You will also probably receive more help if people don't get mad at how you ask your questions.
Quote this message in a reply
Lord Vader
Unregistered
 
Post: #14
Ok, I'll admit I am not the best at grammar or spelling. I will try to type slow enough so I don’t make mistakes, and check all my spelling. Anyways, I get plenty of lectures from my English teacher on spelling and grammar.

Lord Vader
Quote this message in a reply
Moderator
Posts: 3,570
Joined: 2003.06
Post: #15
themacman13 Wrote:2. "It" is a pronoun without an antecedent
It's been a long while since I was in school. What the heck does "pronoun without an antecedent" mean? What would have been the proper way to phrase it?

Also, it should be: "You should also invest in a dictionary and/or an English grammar book."

skyhawk, and others, are known to be picky about grammar and spelling from time to time. I'm not sure if I really agree with their level of pickiness, but making an effort to use proper English here can't hurt. Solid communication with customers and fellow developers is important in the end. The only way you can get away with bad spelling and grammar is if your primary language is clearly not English. Even then you'll probably get picked on unless you happen to be from France or Japan. Rasp

Back to the topic:

I like to use OpenAL for sound effects like gun shots and explosions and haven't had any problems with it. There are a few quirks that have to be dealt with here and there but it's the easiest sound library to use for games right now IMHO (sorry aarku, I haven't played with SqueakLib yet). Plus it's cross-platform compatible.

As mentioned earlier, Quicktime is just fine for longer samples like music tracks. The only problem is that it adds a gap in-between loops, but that can be worked around with a little extra coding or clever composing. I like to use Ogg-Vorbis instead for music tracks.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Core Audio SDK Code Examples SparkyNZ 4 10,165 Jun 9, 2011 02:34 AM
Last Post: SparkyNZ
  Using Core Animation for 2D-Games? Tyler 4 5,489 Oct 27, 2007 07:25 AM
Last Post: maximile
  Core Image, will it help? DudetheCreator 4 4,319 May 12, 2005 06:18 PM
Last Post: DudetheCreator
  Core Audio mutlichannel audio tachyon 2 5,918 Mar 18, 2005 01:04 AM
Last Post: tachyon
  SDL & Quicktime DM6 4 3,154 Jul 4, 2004 08:22 AM
Last Post: Steven