r1037 (+ GZD r123) Loud buzzing noise

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Enjay
 
 
Posts: 26939
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

r1037 (+ GZD r123) Loud buzzing noise

Post by Enjay »

There is a loud buzzing noise on some maps. I didn't notice it with the versions released before today (I forget which number I had actually compiled) and it did not happen with GZdoom r122 either.

It seems to only happen with add on maps so maybe it's something to do with ambient sounds or something.

Here's a video of my own Overlord WAD in r1037 to illustrate the point. Don't worry about the sky using the notexture thingy, it's supposed to be a GZdoom skybox.

http://www.rowand.myzen.co.uk/noisy.wmv
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Graf Zahl »

The problem is caused by the ambient sound things. I'm too tired to investigate further though.

Another thing I noticed while testing this: FSoundChan::Mover neither contains a read barrier nor is it processed in any way by the garbage collector. I got a crash with Operation Overlord with this when I was quitting.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by randi »

It shouldn't be needing any special garbage handling if everything is working right, though, since one of the things the actor's Destroy() is supposed to do is detach all the sounds from it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Graf Zahl »

It still crashed because it pointed to something invalid.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Graf Zahl »

I was able to fix the immediate cause but I don't know what caused it to make this odd buzzing noise instead. It sounds as if the sound was restarted over and over again so I suspect some hidden problem in the sound code that accidentally got triggered by the error in the ambient sound thing.

Maybe Randy can say more so I'm leaving this report open. My change was as follows:

Line 1884 in s_advsound.cpp:

Code: Select all

			S_StartSound (&this->x, this, NULL, CHAN_BODY|CHAN_LOOP, ambient->sound,
				ambient->volume, ambient->attenuation);
The first parameter was NULL in the previous non-working revision.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by randi »

This does highlight one major failing of looping sound playback: The caller is responsible for checking that a looping sound is still playing and restarting it if it stops. This should be handled transparently by the sound code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Graf Zahl »

Ok, good to know. But since a design flaw isn't a bug... ;)
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by randi »

...a design flaw which has now been rectified.

Also, this:
Graf Zahl wrote:It still crashed because it pointed to something invalid.
Was because the ambient sound called S_StartSound() without a valid point, and because S_RelinkSound() looked at points instead of actors. So it was two errors, working in tandem that caused it to crash. You fixed the one, so that stopped the crash and also properly flagged the actor as making a sound, which stopped it from trying to restart the sound every tic.
User avatar
Enjay
 
 
Posts: 26939
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Enjay »

Changelog wrote:Any sounds that were playing when you saved will still be playing when you load.
Thank you. That's a mainly cosmetic, but very, very welcome improvement. :yup:
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Graf Zahl »

Enjay wrote:
Changelog wrote:Any sounds that were playing when you saved will still be playing when you load.
Thank you. That's a mainly cosmetic,
Actually not. Imagine a sound containing an important message but interrupted by saving and quitting. You'd have had no chance to hear the rest.
User avatar
Enjay
 
 
Posts: 26939
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Enjay »

Hence the "mainly". ;)
User avatar
Slasher
Posts: 1160
Joined: Sun Mar 16, 2008 11:17 pm
Location: California

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Slasher »

IMO, a sound that contains important information, that isn't also displayed as text or something, would be a bad design choice on the modder's part.

But otherwise yes, I agree and am pleased the annoying noise is gone.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Graf Zahl »

Slasher wrote:IMO, a sound that contains important information, that isn't also displayed as text or something, would be a bad design choice on the modder's part.
People still do it.
User avatar
Slasher
Posts: 1160
Joined: Sun Mar 16, 2008 11:17 pm
Location: California

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Slasher »

On the other hand, it could partially be called the player's fault as well. I mean come on, who saves and quits right in the middle of an important message? :?
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: r1037 (+ GZD r123) Loud buzzing noise

Post by Gez »

Slasher wrote:IMO, a sound that contains important information, that isn't also displayed as text or something, would be a bad design choice on the modder's part.
Welcome to Strife. It does have a log feature, but it isn't always used.
Post Reply

Return to “Closed Bugs [GZDoom]”