ID:2517307
 
Resolved
The sound.environment var wasn't working correctly.
BYOND Version:512
Operating System:Windows 10 Home
Web Browser:Chrome 75.0.3770.142
Applies to:Dream Seeker
Status: Resolved (513.1496)

This issue has been resolved.
Descriptive Problem Summary:
Changing the variables, echo and environment in sound, produces no hear-able effect on the sounds.

Numbered Steps to Reproduce Problem:

Code Snippet (if applicable) to Reproduce Problem:
/sound/S = sound('sounds/example.ogg', volume=50)
var/list/L = list()
L[1] = 80
S.environment = L
world << S

Above is basically how I've tried to do it. I've also attached a zip where I made a terrible, small project with a bunch of html input sliders to mess around with values. But changing them this way similarly has no effect.

https://www.dropbox.com/s/i6g9m863xrlqjmf/ sound_testing_src.zip?dl=0
Expected Results:
Hear different sound effects.
Actual Results:
sound stays exactly the same.
Does the problem occur:
Every time? Or how often? Sometimes changing the value of AirAbsorptionHF to high negative numbers made the sound stop playing. But that might've been my imagination or a sound caching thing.
In other games? n/a
In other user accounts? yes
On other computers? yes. I spoke to another person who told me they experimented with echo and were unable to hear any changes.

When does the problem NOT occur?
n/a
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
no
Workarounds:
no
That code snippet won't work; the list value is incorrect, so that's why you're seeing no effect.
Okay sorry. I knew I shouldn't have used that snippet, but I saw that section asking for one and thought my actual code was too much to put there. I made a mistake there.

/mob/verb/env_test_html()
set category = "html"

src << browse(envTester.getHTML(), "window=win;size=600x800;")


var/global/datum/envTester/envTester = new()datum/envTester
var/sound/S1 = sound('sounds/example.ogg', volume=50)
Topic(href, href_list)
S1.environment = build_environment(href_list)
usr << S1

proc/build_environment(href_list)
var/list/environmen[23]
var/count = 1

for (var/i in href_list)
usr << "C=[count]-- [i] - [href_list[i]]"
if (i == "src") continue

environmen[count] = href_list[i]
count++

return environmen
proc/getHTML()
return //...// This returns a big string of html with a form that has an input slider for each value.
There are still errors in that code. I would suggest you try my Sound Playground demo and see if you get different results from that. If so, then the issue is something in your code.
Thanks for the quick responses, I appreciate it.

The only error I think I had was not using text2num on my values in the href_list, but fixing that seems to have no effect. Similarly, I tried your Sound Playground once a while ago and it did not work when I used it. Which was partially why I tried making my own.

Here in this video I go through every one of your preset arrays in the Sound Playground and as far as I can tell they all sound exactly the same:

https://streamable.com/ixjxk

I don't think the issue is with my machine in particular or its sound car or anything like that since using the preset by setting the number (like: S.environment = 21 ) does manipulate the sound. But the direct changes to the array don't for me at least.
So I tested the sound playground a little bit more thoroughly and still have the same results. I had several other people on different machines try to run the sound playground and they reported the same results I noticed. Which are: Making manual changes to the sound.echo and sound.environment have no effects on the sound.

The only parts of the sound playground that work are the sound changing and the "Position x/y/z:" stuff, all the environment and echo effects do not.

I tested the demo using older versions of byond as well and was not able to find any version that it worked on. The oldest I tested was Version 354 from 2005 and Version 460.1052 from 2009. Both of which compile, and both affect no changes of the echo and environment.

Really confused what can be going on here, I felt sure that it would work on the 2009 version since that was when the demo was last updated, but nothing. And considering I had other people test on their most up to date byond version, the problem is not singular to my machine. I'm lost.
Lummox JR resolved issue with message:
The sound.environment var wasn't working correctly.
Huh. I ran some tests and confirmed I couldn't get any changes in Sound Playground either. I was finally able to discover a setting I could change that would make this work again, but it's confusing to me why it was a problem at all.

Oddly my old machine's sound card didn't have any issues with the previous wsy the routine was called.