Jump to content


Photo

Ambient sounds stutter


  • Please log in to reply
64 replies to this topic

#1 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 05 June 2012 - 12:41 PM

Got hit by it in BGT game, all three first major areas (Candlekeep, crossroad, FAI), haven't checked any farther yet.

What's the current status on this problem? I've searched the forum, but there doesn't seem to be any advance made in solving it.

I recall there were assumptions it may be caused by ARE and sounds not being in the same biff, but apparently that is not the case. Many vanilla BG2 area are stored separately from their sounds, without any lag. I've put AR6600.ARE and it's four ambients into one biff, and this also had zero impact.

I'm a little at loss where to dig now :(

Retired from modding.


#2 Azazello

Azazello

    The Anti-Spammer

  • Staff
  • 1912 posts

Posted 05 June 2012 - 02:45 PM

Have you tried any of these?

#3 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 05 June 2012 - 03:05 PM

Those are script stutters, while I'm talking about the ambient one. The common solution is to turn ambient sounds off in BGconfig.exe, but this is not really a fix, just a crude workaround - and I want to get to the bottom of it, now that I can reproduce this bug once again.

I have tried to replace the "ocean" AMB_E10A reference with "birds chirping" AMB_E05E. If it was bad before, then it became utterly unbearable now.
Tried to replace the ocean WAV with an empty one - no effect.

This leads me to believe that water sounds are not responsible, even though the stutter usually happens in areas with lots of water running.

Retired from modding.


#4 Azazello

Azazello

    The Anti-Spammer

  • Staff
  • 1912 posts

Posted 05 June 2012 - 03:19 PM

I'm with you, I should have been more specific...

Have you considered either doing the low-level digging Suslik did for scripts, to determine why ambient sounds can cause stutters; or encourage someone like him(her) to do it?

I don't know if you have such code-fu to do it - I certainly don't.

#5 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 25 June 2012 - 11:34 PM

As it happens, the above case was due to unbiffed override. However, I did found a true ambient stutter after some time, in ar8200 and ar8100 areas of Baldur's Gate.

An interesting discovery I have made, is that the stutter consistently disappears after entering any minor area in the above-mentioned locations, saving there, and loading it.

Stutter consistently re-occurs in the following cases:
1) save-loading while present in the affected area
2) entering the area via worldmap
3) using MoveToArea() console command to get there

Retired from modding.


#6 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 30 June 2012 - 05:20 AM

BGT at least fixed the missing ambients error, though there are still missing ones in Tutu and BG1 (plainab also wrote a fix for those though I don't know where it is at present). As for errors with existing ambients, I don't know how you would fix it other than by reproduction and process of elimination. In other words, if you hit stutter in one particular area, hack the ambients out of the .are file in the .sav one by one until you figure out which one(s) it is. Could be an issue like a bitrate error or something like that.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#7 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 30 June 2012 - 08:08 AM

I've seen those threads. It's not about missing files but existing ones. And while your suspicions about broken water WAVs may seem valid, I did try to replace them with other sounds - and it kept on stuttering.

More importantly, why the hell would the game decide whether or not to stutter, depending on how I get into the affected area?

Retired from modding.


#8 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 05 July 2012 - 12:16 PM

More importantly, why the hell would the game decide whether or not to stutter, depending on how I get into the affected area?

Ambients have a position and a radius, so they fire off in different parts of areas. For some reason, the obvious didn't occur to me at first after reading your post, but it must have occurred to you. So to get back to what I said, there are problems with specific ambients rather than ambients in general, that would require elimination testing to track down.

Edit: they also have (or don't have, depending on the setting) a random sound selection factor within each ambient, so you would have to account for that as well.

Edited by Miloch, 05 July 2012 - 12:18 PM.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#9 -paulo-

-paulo-
  • Guest

Posted 05 July 2012 - 09:36 PM

For debugging these you might want to make a script that overrides every sound in a area except one, adds that one to a text file, run, verify, quit, then switches current sound to another that was not tested yet etc.

#10 -paulo-

-paulo-
  • Guest

Posted 05 July 2012 - 09:39 PM

also, if you have a minimal save game, you might want to get it to Asc64. A debugger could probably find what's happening.

#11 -Shin-

-Shin-
  • Guest

Posted 22 August 2012 - 10:22 PM

I'm having exactly this issue, although it's in BG2 and most notably now in the druid grove. It also disappears and reappears as per GeN1e's discoveries.

#12 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 23 August 2012 - 02:40 AM

You could also use a script or the CLUA console to PlaySound() every ambient in the area to figure out which are causing the issue.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#13 -Shin-

-Shin-
  • Guest

Posted 23 August 2012 - 02:28 PM

This is problematic. I tried PlaySound with all the ambient files, and they all work well without causing slowdowns when played in another area, though sometimes it takes some reloading to get them to play. Then when I attempt to disable ambient files from playing through editing the ARE file, even though I've removed every ambient entry, the ambient music still plays. As the ambient files are only referenced in the ARE file and not actually contained in it, I don't see how it can work like that, unless the game defaults back to the non-override ARE file or something.

#14 -Shin-

-Shin-
  • Guest

Posted 23 August 2012 - 02:36 PM

Even when removing one of the ambient wavs from the bif and then removing it from override as well, it *still* plays inside the area in the game. Honestly, where is the game getting its file info from?

#15 -Shin-

-Shin-
  • Guest

Posted 23 August 2012 - 02:56 PM

Hm, it would appear that each area is contained in the .SAV file, and doesn't necessarily update when you load a save. Upon moving to the area from an earlier save when it was still undiscovered, the ambient sounds are indeed disabled. So it seems you have to decompress the .SAV.. in retrospect, I reckon that was your suggestion all along, Miloch.

#16 -Shin-

-Shin-
  • Guest

Posted 23 August 2012 - 03:27 PM

Ok, it would seem that I found the culprit. For posterity, in this case it appears to be AM1900E1.WAV, which is a position-based bubble-sound for the pools in the druid grove referenced from several spots. Still no telling why it causes this particular problem here though, it appears to play without issues in other areas and outside of the game.

#17 Jarno Mikkola

Jarno Mikkola

    The Imp in his pink raincoat.

  • Member
  • 10911 posts

Posted 24 August 2012 - 02:01 AM

Even when removing one of the ambient wavs from the bif and then removing it from override as well, it *still* plays inside the area in the game. Honestly, where is the game getting its file info from?

Erhm, how did you manage to do what... the .bif files are file archive ... you need to remove the whole .bif to actually do, you can pass the rest of the files to the override folder so the game has access to them... and the file can actually be stored in multiple .bif files. :P So you don't need to change the CD...

Deactivated account. The user today is known as The Imp.


#18 -Shin-

-Shin-
  • Guest

Posted 24 August 2012 - 10:27 AM

Well yes, I extracted all the wavs to override, renamed the .bif and then renamed the wavs I wanted to exclude. But as said, it was the files in the .sav that were the ones in actual use.. once I learned that it was pretty simple. Annoying that it still doesn't really solve the actual problem though.

#19 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 25 August 2012 - 02:20 AM

Yeah, area files are stored in saved games. Which area did you see the problem in, Shin? Could be there's some wonky settings on that one that aren't on others where it's used or something.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#20 -Shin-

-Shin-
  • Guest

Posted 25 August 2012 - 02:33 PM

The druid grove, AR1900. The sound in question is meant to play when in poximity of the pools in that area I believe, but the slowdowns seemed to happen all over the place. Like GeN1e had discovered, if you enter a subzone like a building in that area, save the game, load that save and then leave the subzone, the slowdown issues will be gone. I never tested if this was because the troublesome wav somehow ended up being disabled though.