ID:2699234
 
Resolved
Changing a sound's frequency caused future frequencies on the same channel to be incorrect if the sound remained playing.
BYOND Version:514.1552
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 90.0
Applies to:Dream Seeker
Status: Resolved (514.1558)

This issue has been resolved.
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.

This seems to be the same problem as in this post: http://www.byond.com/forum/post/1930261

However I believe the initial fix that was put in did fix it for sounds with no channel given (any). I'm unsure if that's the case though.

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:
Frequency changes compound. Anything higher becomes very high, anything low becomes brown note.

When does the problem NOT occur?

When you do not set the channel.

Test File: https://www.dropbox.com/s/uvg7r44e8yx6e65/ Frequency%20Bug%20Tester.zip?dl=0
Lummox JR resolved issue with message:
Changing a sound's frequency caused future frequencies on the same channel to be incorrect if the sound remained playing.
Thanks much, I promise to abuse the capability for cool audio effects as much as possible =D