Jump to content
Sign in to follow this  
stwf

New Sound Manager svn patch

Recommended Posts

I tried the new patch on Windows. There was one conflict due to a recent change, I think your fork/branches might need an update (probably good practice anyway). It compiled successfully in VC2010 (y)

This time without looking at the code or technical aspects, I wanted to get a feel for how it works in practice.

Music works well, it faded at the right times and even after finishing a game I could hear the main menu theme again and the next game's music with no glitches. Very nice ;) It's about time our music was heard properly.

The "Enable Music" in-game option doesn't work anymore; to disable music for testing other sounds, I set sound.musicgain = 0.0. I notice there are also options for master, action and ambient gain. There should probably be a separate channel for UI effects and maybe others - would voices need their own channel? I don't know how difficult it is to add new channels like that, hopefully not too hard?

A few things I noticed about voice / order acknowledgements:

  • The volume is very uneven, some are too loud (Greek females) or quiet (almost all others), but I assume that's easy to tweak
  • Sometimes I can't hear an acknowledgement when I order an off-screen unit to do something. A good way to test this is to play Greeks, select your starting females, move the camera into SoD and then task the selection to move. Most of the time there's silence. You should always hear the acknowledgement independent of location on their own/UI channel.
  • Another test: move the camera well into SoD and find an idle worker (.), you won't hear them answer like they do when already visible on screen.

Training/construction sounds:

  • I can hear training and construction completion sounds for any structure in my camera+LOS, whether it was my own structures, an ally or enemy. I think those should be considered a UI sound and only heard by the owner (except maybe in cooperative play we'd share those sounds) but from anywhere on the map. I imagine we could filter out certain classes of sounds (UI) based on the viewing player's ID and the entity's owner or the player who triggered the action - no need to get into diplomacy.

Battle sounds:

  • No more out of memory error on the huge combat demo in Atlas! :) I believe this is related to other out of memory errors people encountered on longer games.
  • Overall I think it's a big improvement over the previous behavior
  • Death growls are too loud and possibly too frequent, in large battles they dominate the rest of the sounds
  • What annoyed me more was zoom and screen position having no effect on volume. I wanted to zoom out from a battle to make it quieter, but unfortunately it remained just as loud on any part of the screen. I think we should take zoom into account :P
  • IMO battle should be the current volume when zoomed fully in and much quieter at "default zoom", barely audible as you zoom fully out
  • I like Philip's idea of hearing nothing but ambient sound when fully zoomed out. We could make ambient sounds louder when zooming out to accentuate the quieter action sounds.

There seems to be an error in calculating which sounds are off-screen, consider this screenshot from the Death Canyon Invasion force map:

q9yEjs.jpg

Clearly there are no units visible on screen, but I can hear most or all of the battle in the upper-right corner. At most I should hear very faint sounds of battle from a few units or more strictly, nothing but ambience. The minimap camera quad is also way off on that map as you can see, maybe both sound and minimap are using a flawed calculation?

Another example of buggy sound cutoff, looking at just the minimap (Punjab 3):

NOEM0s.png

I marked in green a few camera locations where I heard a group of female's order acknowledgements and marked in red where I couldn't hear them (you can see the females as a group of blue dots in the middle of the revealed LOS). It shouldn't be too hard to reproduce. While acknowledgements are a special case that IMO should be fixed as described above, they are useful for testing cutoff too. Resource gathering seems to be handled differently, it always stopped for off-screen units.

It seems the endlessly repeating bird in Atlas has been fixed, scenario designers will be happy about that :D

Minor annoyance: sound really needs to stop immediately when I close the game. Especially with user feedback enabled, music and other sounds can linger for several seconds which is weird considering the game window has disappeared. Even without user feedback enabled, I heard a few bird chirps once after exiting the game. There may be similar issues if the game crashes and continues running in the background but I couldn't trigger that.

Needs more testing, if anyone thinks of more good test cases, post them ;)

Share this post


Link to post
Share on other sites

OK, Thanks for the feedback. I'll investigate all of those.

Adding new voices should be pretty easy, we can either create new Javascript objects like I did for Ambient sound and Music, or create some flags and place them in the xml files.

Speaking of which the gain for each sound is set in the xml. Some sounds have bounds for a high and low range that gets randomly played in that range. I'll do some double-checking to make sure all of those values are being applied correctly, after that it will just be a matter of setting the values in the xml file right.

The easy one problem will be the acknowledgements. They should have the distanceless flag set. This will allow them to be heard wherever they are on the screen. I'll try and get that checked in, at least where I can find them.

The battle thing is odd, I'll look at that. Aso I can raise the falloff value on zoom out. I didn't realize you really wanted to hear nothing but music and sounds at full zoom!

Finally I'm not quite clear on the building sounds... Should I be filtering that out, or is it up to the engine to only send the right sounds to the sound manager?

Share this post


Link to post
Share on other sites

Finally I'm not quite clear on the building sounds... Should I be filtering that out, or is it up to the engine to only send the right sounds to the sound manager?

Construction, training and research completion are in the same class really, being "private" sounds :) The way it's implemented now, those sounds originate from a certain entity in the simulation, which has no knowledge of which player is viewing the game. It calls the sound manager directly. We could add another layer but at some point it boils down to the simulation triggering a sound for a certain player, and our needing to filter out messages/events/sounds for other players. There will also be UI sounds that several players should hear: minimap flares, taunts, and so on.

Share this post


Link to post
Share on other sites

Hi Guys,

Sorry for the absence. I'll be away and off internet for next week. As such I had a TON of work to get done before I left. Here is a patch for my latest work (also checked into my branch on github). The state is:

The issues with acknowledgements have been fixed, and some other bugs about the screen area that may have caused historic_brunos issues with battle.

I have confirmed that the gain values specified in the xml fiels are being honored. So getting the volumes balanced should just be an issue of setting those values right.

There are 2 remaining known issues.

Getting the volume rollofff right, the simple exponential rolloff won't do. I need to use of of the more complicated modes to keep the sounds loud when you are close, but silent when you are zoomed out.

Private sound issue. Some sounds of your opponents (I guess the ones that are set to Omnipresent) can be heard by all players.

I'll be able to get right on these when I return...

steve

good_sounds.patch

Edited by stwf

Share this post


Link to post
Share on other sites

Sounds like good solid progress in the time you have had available :) Looking forward to when the changes are done and reviewed so it can go in the SVN :)

Share this post


Link to post
Share on other sites

Hello All, Just to let you know I'm back on the case! Sorry about the errors in the patch, I'm coding in a git environ, then using some cmd line stuff to move it into a svn derived branch. This process copies over new files, but for some reason doesn't add them to the svn tree. So until I do that they don't get included in the patch.

I will put a press on to get this done this month. It should not be a problem....

  • Like 1

Share this post


Link to post
Share on other sites

Hello All, Just to let you know I'm back on the case! Sorry about the errors in the patch, I'm coding in a git environ, then using some cmd line stuff to move it into a svn derived branch. This process copies over new files, but for some reason doesn't add them to the svn tree. So until I do that they don't get included in the patch.

I will put a press on to get this done this month. It should not be a problem....

OK, if it helps at all, I can just pull directly from your Github repo. Since I found out how easy that is to do. That might help eliminate any yucky SVN<->Git interaction :)

Share this post


Link to post
Share on other sites

That reminds me, if the git repo is updates with a svn revision that came from git, does that mean the history in the git repo is squashed to conform to the svn version or does everything play nice?

Share this post


Link to post
Share on other sites

I'm really sorry for the delays in finishing this up. THe life of someone married to a teacher changes drastically in the summer! Less tired wife == less coding time!

I do have an up to date version, that merges cleanly with the current trunk. I'll upload those patches tonight. I think it would be good to get that code into the next full out release. Then we could get a start on addressing the real world bugs.

I had one chance to try and get the rolloff working right but couldn't. I just need to sit down with the maths and figure it out right once. Hopefully soon I can do that.

Share this post


Link to post
Share on other sites

We have plenty of math geniuses in IRC that you can call on. For now though, if it holds things up, comment it out, make a TODO note, and polish what works.

Share this post


Link to post
Share on other sites

We have plenty of math geniuses in IRC that you can call on. For now though, if it holds things up, comment it out, make a TODO note, and polish what works.

Agreed, for now the most important thing is to get sound working for as many people as possible (hopefully everyone :) ). If we can't have exactly all the features of the current implementation (was rolloff even part of it? Not that I'm too sure about what that is, and yeah I could google it, so don't worry about explaining it, I just mean that as long as the basic functionality is there for this release I'll be more than happy :) ).

Share this post


Link to post
Share on other sites

ok, here is the new patch. I ran it against the trunk and it then built. So everything should be in here... I'll be away until Friday, so I won't be able to fix any issues until then...

Good Luck!

RealPatch1.diff

Share this post


Link to post
Share on other sites

ok, here is the new patch. I ran it against the trunk and it then built. So everything should be in here... I'll be away until Friday, so I won't be able to fix any issues until then...

Good Luck!

Sounds great (y) Hope no bugs will be found (or rather that if there are any bugs they will be found now and not once this is released ;) ), and thanks for your work so far. This will be a welcome change for a lot of people. Don't take that as pressure to do anything than your best, but take it as confirmation that what you are doing is useful/wanted and encouragement to keep going ;)

Share this post


Link to post
Share on other sites

This is a trivilality, but is this intended:

Index: build/premake/premake4/build/gmake.unix/Premake4.make

===================================================================

--- build/premake/premake4/build/gmake.unix/Premake4.make (revision 12247)

+++ build/premake/premake4/build/gmake.unix/Premake4.make (working copy)

@@ -28,8 +28,8 @@

CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)

CFLAGS += $(CPPFLAGS) -Wall -Os

CXXFLAGS += $(CPPFLAGS) -Wall -Os

- LDFLAGS += -s -rdynamic

- LIBS += -lm -ldl

+ LDFLAGS +=

+ LIBS += -lm -ldl -framework CoreServices -framework CoreServices -framework CoreServices -framework CoreServices -framework CoreServices -framework CoreServices

Seems like an OS X specific option?

Edited by zoot

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...