#Directional sounds getting stuck

1 messages · Page 1 of 1 (latest)

pure sundial
#

When some directional sounds play, they get stuck in the direction they originally started playing in. So if you were to hear a sound to your right, and then turn right to look at the sound, the sound would keep playing in your right ear. This is most noticeable during the room2closets event, and when 173 is teleporting away in the intro after the breach. 173's stone drag sound also keeps playing after it's teleported away after the breach too, I feel like that shouldn't happen and it's meant to only play for a short while.

Idk if it's just me, because I've never heard anyone mention this before. But I thought maybe I should bring it up.

carmine shoal
#

yeah ive had this happen countless times too

lament rampart
#

what the fuck is this code lmao, it really just calls a function that plays the sound and sets its volume and pan ONCE based on the relative position and rotation of the object and the player when the sound started playing "yeah sure that's good enough nobody will notice"

gloomy birch
#

I also think this happens in 939 area when you open the door and you hear it in the distance

carmine shoal
#

couldnt you make a new type with all the audio stuff in it, and a new list of said type that only holds active sounds

#

& playsound2 adds a new sound / item to the list

#

so in the main loop there'd be a func to update all the audios in the list

#

so the audios get updated until they finish

#

if i was regalis

lament rampart
#

this is pretty much exactly what i have already implemented

#

the issue is that for some instances of playsound2 the returned channel is used to continuously update it

carmine shoal
#

implemented locally? or did i miss a commit or two

lament rampart
#

locally because of the issue i mentioned

#

the questions is:

  1. do we want to discard this system and just fix the few instances where they aren't updated continuously?
  2. do we want to add the system as an extra layer, potentially overriding/conflicting with the existing updates
  3. add a playsound3 that is intended for exactly this use case of "fire and forget" sound effects
carmine shoal
#

send the block and ill check it out

carmine shoal
lament rampart
#

the name "PlayingSounds" is dogshit

carmine shoal
#

i wouldve done PositionalAudio

lament rampart
#

maybe AutoPositionalAudio since it's fire and forget semantics

lament rampart
#

although it can be tricky, since e.g. each door has one sound channel and that always gets updated which isn't immediately obvious from the playsound2 calls that assign to it

carmine shoal
#

LoopSound2 & UpdateSoundOrigin should update the stored params in the PlayingSounds object rather than directly manipulating the channel

#
    For s.PlayingSounds = Each PlayingSounds
        If s\Chn = Chn Then
            s\Camera = cam
            s\Entity = entity
            s\Range = range
            s\Volume = volume
            Exit
        EndIf
    Next
#

you could just do this

lament rampart
#

loopsound2 is a completely different system that works fine as is I'm pretty sure

#

updatesoundorigin having to loop through all playing sounds is iffy

carmine shoal
#

playingsounds constantly updates active sounds but loopsound and updatesoundorigin also directly update the pan & volume of the channel too

lament rampart
carmine shoal
#

bit of a conundrum

lament rampart
#

yeah I'll figure something out

carmine shoal
#

i still think integrating it into those two is the best option

#

maybe it could just be an array lookup indexed via channel handle instead of that loop garbo

#

im not too sure

lament rampart
#

that would limit the maximum amount of concurrently playing sounds though (unless you wanna get into really weird shit with resizing dims)

carmine shoal
#

just set max channels to like

#

2048 lol

#

that max amount thing wont be an issue for cb

lament rampart
#

41KB 🤯

#

ultimately it doesn't really matter as long as the solution doesn't have the potential to break a ton of shit

#

which is why i generally prefer bandaid solutions over refactoring for cb

#

the code is dogshit the engine is dogshit and the best you can do is only changing as little as necessary

lament rampart
#

it's still dogshit! but what I fundamentally meant was the language being dogshit

carmine shoal
#

you right

#

at least you guys have enums now

#

thats what itzslain said

lament rampart
#

do we?

carmine shoal
#

i guess

#

i still did it first doe