Descriptive Problem Summary:
When using the SOUND_UPDATE flag on a repeating sound that exists on a channel, any modifications to frequency are compounded.
That is to say: If you set frequency to 1.05, instead of the frequency becoming 1.05, it will become 1.05*frequency. This, when called repeatedly, causes the sound to pitch up until it reaches the frequency limit, a high pitched whine of death.
This does not match other interactions such as volume, which becomes set to the value given, rather than being modified by that value.
Numbered Steps to Reproduce Problem:
Create a sound on channel x, that repeats.
set it's status to SOUND_UPDATE.
change the sounds frequency then send the sound to the client.
Wipe the blood from your ears.
Expected Results:
Behaves like volume which becomes set to the value given.
Actual Results:
Compounds with the value given, causing nearby windows to shatter.
Workarounds:
I attempted to create a very obnoxious and abstract system to work around it, but I found that even when not really modifying frequency at all, (frequency+=0) the pitch would still increase.
ID:1930261
Sep 3 2015, 8:13 pm
|
|||||||||||||
Resolved
| |||||||||||||
Sep 3 2015, 8:52 pm
|
|
Good catch! I can see right where this is happening in the code. I'll have to figure out a way to work around that
|
In response to Lummox JR
|
|
I was going insane thinking it was normal behavior, then I noticed how volume worked and I was like "Heyyy....."
|
Any update on this? I'm working on putting sound into Lux and I just remembered this is still a thing.
|
Lummox JR resolved issue with message:
Doing a SOUND_UPDATE with a frequency setting (e.g., 1.05) caused the frequency to multiply over and over each time the sound updated, instead of simply setting the frequency to the desired multiple. |
Oh neat. I found this with the Dragon Warrior clone, but never reported it. Cheers.
|
In response to Bravo1
|
|
If this somehow came back, and I have no idea how, it's going to need a new bug report and I'll need to track down where the issue began. At this point probably a test case would help too.
|