Sign in to follow this  

Question about Sound Technology

This topic is 4558 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sound in games has never really been of huge intrest to me. I have had a SB Live! Plantum for the last 4 years (hand me down PC here) and I always justed used sterio speakers...my dad wanted some speakers so I bought a speakers system for myself with 4 speakrs and a subwoofer. I tried UT99 with 3D sound and jDoom as well and its pretty cool, but didnt blow me away. What I am wondering is with all this sound tech, what the difference is between EAX and Dolby Digital 5.1 and all that. I was under the impression that EAX was a sound engine development API like D3D and OpenGL are used for graphics. Is this right? When I eventually get around to adding sound to my engine (a long way off yet) what should I know? Is Direct sound just a sterio API for DirectX? Is there a DirectSound3D? Is it hardware or software based? Where does EAX fit into all of this? Also, was the now dead Aureal3D the same thing (like a competing API) as EAX? The original UT also supported Dolby Pro Logic and many new games support Dolby Digital 5.1. How do you write support for there into a games sound system? Is there a dolby API or something? Sorry but I am a real noob at sound technology. :)

Share this post


Link to post
Share on other sites
Not an expert here either, but I'll try to help.

DirectSound supports both 2D and 3D audio. Audio (2D and 3D) is achieved by loading the wav into secondary buffers. If the sound is to be 2D, this buffer can be either mono or stereo.

3D audio is achieved with mono wave files, hardware mixing and listeners. You tell the secondary buffer to play at a point in 3D space and you set the listener to the point where it will be received. The hardware than mixes the mono wav file to make it quieter or louder (distance) or pan it (left / right). If your sound card supports surround sound, it will pan it between the front and back speakers as well. All mixing is done through the hardware.

I'm not sure about EAX myself. I believe it is a seperate API, but I couldn't seem to find an SDK download anywhere. A Google search hints it's a seperate API but doesn't reveal much more information outside of that.

Share this post


Link to post
Share on other sites
Yeah I found some Gamedev.net articles and it seems OpenAL is all the rage, especially for getting a basic 3D sound system up and running. I dont know if its hardware based though. EAX seems to be an extension on top of DirectSound...but I am sure EAX canb be used in Linux...hmm

I cant find anything relating to using Dolby Surround Sound in games.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mr Lane
Sound in games has never really been of huge intrest to me. I have had a SB Live! Plantum for the last 4 years (hand me down PC here) and I always justed used sterio speakers...my dad wanted some speakers so I bought a speakers system for myself with 4 speakrs and a subwoofer. I tried UT99 with 3D sound and jDoom as well and its pretty cool, but didnt blow me away.


Lucky you! I've been using the motherboard integrated sound devices all my life. I would like to get a SB Live Platinum or Audigy 2 though... [wink] As for speakers, I have some great ones that can make any sound card sound good - some Logitech 2 speaker + sub combo (2.1), it really sounds great. I need to get the 6.1 set. Anyways...

Quote:
What I am wondering is with all this sound tech, what the difference is between EAX and Dolby Digital 5.1 and all that. I was under the impression that EAX was a sound engine development API like D3D and OpenGL are used for graphics. Is this right?


Quote:
EAX Unified technology is a mechanism for automatic translation of one version of EAX into a previous version. With EAX Unified the Environmental Audio features of your EAX application can be supported on any PC platform, whether or not it includes a Creative sound card with the latest drivers installed.


So yes, EAX is an audio API, which it is like an extension that you can use for more control over audio in terms of special processing and effects. You do not use EAX itself, normally you use another audio API, such as OpenAL, and then bind it in for EAX support ion your programs. DD 5.1 is more or less a feature that a sound card can take advantage of the higher quality of music, movies, etc... which has DD 5.1. I think there is an API for it, but I do not know (and highly doubt) if it is publically avaliable.

Quote:
When I eventually get around to adding sound to my engine (a long way off yet) what should I know? Is Direct sound just a sterio API for DirectX? Is there a DirectSound3D? Is it hardware or software based? Where does EAX fit into all of this?


You have quite a few audio API choices.
FMOD
OpenAL
Audiere
BASS
SDL
and then there is DirectSound and DirectMusic.

Now with DS or DM, you can do 3D sound and 2D sound, as with the other libraries, so there are no DS 3D or DM 3D, it's all wrapped into one API. What you need to know is how is your engine going to be used. If you are making something for your own personal benefit to show off and perhaps mess around with for private use, then FMOD is free and the best option due to how easy it is to use and all of its features.

However, if you plan to sell your engine or make games with it for commercial products, FMOD costs an arm and a leg, as does BASS. In that case, OpenAL, Audiere, DS, or DM will be your best bets. OpenAL is LPGL, so all you have to do is link dynamically to the .dll and you are fine to keep your code closed source. The same applies to Audiere.

Ideally you want something that you can work with that you are comforatble with. If you are aimming for cross platform, then DM and DS are out of the questions, if not, and you are very comfortable with the DirectX API style, then those 2 would suit you well. I know that I do not comprehend DX api well, so I stay away from it. I do however, understand OpenGL - which OpenAL closely resembles. TBH, OpenAL is quite easy to work with and straight forward, but there are quite a few gotchas that you will have to watch out for - just silly stuff tutorials don't make clear and explain.

Whatever API you choose, you *should* have the option to add in EAX settings, so anyone with EAX support can have better sound. I know included in the OpenAL SDK the example comes precoded with options for EAX support, so you may want to download that SDK and look at the example in there to see how it all looks.

Quote:
Also, was the now dead Aureal3D the same thing (like a competing API) as EAX?

IIRC, EAX is pretty much Aureal3D absorbed into Creative's audio code. More or less of course. Here's a semi-useful thread on EAX and A3D, I can't find the discussion one.

Quote:
The original UT also supported Dolby Pro Logic and many new games support Dolby Digital 5.1. How do you write support for there into a games sound system? Is there a dolby API or something?


Probabally, but I can't imagine what you have to do to be able to be able to license it and use it. Something you will have to research [smile] Now I am no expert, so I can't say this is 100% accurate, but I do try [wink]. I'm sure someone will correct me if I've made a mistake.

Share this post


Link to post
Share on other sites
I'm using DirectSound for 3D SFX and it's pretty simple. There are several 3D models in DS of differing complexity which you choose from with a flag at initialisation; you can just choose the best one supported in hardware (DS will also do 3D sound in SW if no hardware 3D acceleration is supported).
I believe that in older versions you had to do some hacks to use the more advanced EAX features with DS, but these days I think DS uses/incorporates EAX technology - you just use DS and it does the rest.

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
OpenAL is LPGL, so all you have to do is link dynamically to the .dll and you are fine to keep your code closed source.

Ideally you want something that you can work with that you are comforatble with. If you are aimming for cross platform, then DM and DS are out of the questions, if not, and you are very comfortable with the DirectX API style, then those 2 would suit you well. I know that I do not comprehend DX api well, so I stay away from it. I do however, understand OpenGL - which OpenAL closely resembles. TBH, OpenAL is quite easy to work with and straight forward, but there are quite a few gotchas that you will have to watch out for - just silly stuff tutorials don't make clear and explain.
My engine uses SDL and OpenGL for the rendering. I knew SDL had an audio system, but was under the impression it was a software sterio system. I will check it out. As I am aiming for cross platform and and also adding sound support to my map editor (which uses wxWidgets and OpenGL) I think I am on the path to OpenAL. :)

Quote:
Whatever API you choose, you *should* have the option to add in EAX settings, so anyone with EAX support can have better sound. I know included in the OpenAL SDK the example comes precoded with options for EAX support, so you may want to download that SDK and look at the example in there to see how it all looks.
Will do.

Great info, has cleared alot up and thanks for the links. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Mr Lane
My engine uses SDL and OpenGL for the rendering. I knew SDL had an audio system, but was under the impression it was a software sterio system. I will check it out. As I am aiming for cross platform and and also adding sound support to my map editor (which uses wxWidgets and OpenGL) I think I am on the path to OpenAL. :)


Whoops, forgot those links. With SDL you can choose between the native audio (strongly not reccomended), SDL_Mixer, and SDL_Sound. As for software/hardware, I'm not entirely sure but I am guessing it is software based simply because of "how low level it is because it must work on a wide variety of platforms with different hardare" (from Focus on SDL). I think OpenAL will suit you just fine. [wink]

@d000hg: Did you use an online tutorial for Direct Sound, or a book, or just kinda made it? I've found a few tutorials on using Direct Sound, but nothing that made me just really want to use it. I dunno, I have a book on it that I should probabally read and give it 'a try'. [lol]

Share this post


Link to post
Share on other sites

This topic is 4558 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this