Sound volume question

Sound volume question

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
Optimus Prime
Posts: 755
Joined: 03 Oct 2005, 14:31

Sound volume question

Post by Optimus Prime »

I asked it some time ago, but no one could help me, so i will try it again.
How is sound volume and sound distance defined?
Sometimes, sounds are very loud and you can hear them everywhere on a small map, sometimes, they are very loud, but only when you zoom near the sound source and sometimes sounds have only low volume.
What i could find out myself is, that the default damage effects the sound volume. I thought that the areaofeffect would define the sound distance, but that seems to be wrong (Annihilator for example can be heard from far away, but it doesnt have a big areaofeffect).
So does anyone know more about the sounds? Do the sound file types have to do with it?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I don't know, either. I've been trying to figure out how sound works for quite a while now, with much frustration- I can get sounds to play, but very frequently sounds that I want to play loud enough to hear over long distances, like big explosions, will play so quietly that they're drowned out by gunfire, etc. It's very annoying!
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

Try looking in to using openAL libraries.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Direct X is used on windows
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Again, on point... it's not that sounds don't play... it's that they play TOO QUIETLY.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

... just got done with an extensive test. I've found that this has ZERO to do with the sound format. If Spring will play it, it will play it. However, it doesn't mean it'll play it RIGHT. Very annoying!
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Post by Peet »

AF wrote:Direct X is used on windows
Hmm, the funny thing is, spring is opengl...not directx.



Seems to me openAL is quite good for positionally-accurate audio.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Quit derailing the thread, please. This is not about the relative merits of DirectSound via SDL vs. OpenAL.

This thread is about why sounds aren't playing at proper volumes. And why it's not consistant. Some sounds seem to be fine, some aren't... and their relative top-end volumes don't differ by much, if at all. It just doesn't make any sense.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ok, for unit explosions, I have solved it. Just use play-sound, and compile in TA:K mode. Which is probably what everybody will want to do, once I release the new GPL includes.
User avatar
Optimus Prime
Posts: 755
Joined: 03 Oct 2005, 14:31

Post by Optimus Prime »

how does the play sound script works? Can you write a complete example please? I tried it and it crashed the game. I selected TAK in scriptor. Do i have to include something important?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

for the record OpenGL doesnt do sound, thats OpenAL.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Optimus:

Yes, you must use modified Includes when you compile. I will be making all of my code for NanoBlobs, which contains a number of important new advances, available to all modders under the GPL as soon as the mod's sounds and new graphics for the interace are prepared. I'd say... about 72 hours, max, I am making very steady progress, now that the hardest issues have been resolved. Have you read my new Plant script, which I posted in the NanoBlobs thread? If not, go read it... it's just a sample of how much I am going to simplify everybody's lives ;)

The scripting itself is simple:

Code: Select all

play-sound("Argh_SRook_Death",15);
... somewhere in the Killed() script, for example, does the trick.
Post Reply

Return to “Help & Bugs”