Logging Gain in local Hubs instance #3940
-
Would anyone know how to log the gain value, or more specifically which file I should log the gain in? I'm currently experimenting with changing the avatar distance models and therefore trying to see the change in gain values for different scenarios. At the moment I've added this line of code in the audio-system.js file: But with no meaningful feedback. Should I be looking to log it in the avatar-volume-controls.js file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It sounds like you are wanting to play with the The relevant (default) settings are here https://github.com/mozilla/hubs/blob/master/src/components/media-views.js#L205-L211 for media and here for avatars https://github.com/mozilla/hubs/blob/master/src/components/avatar-audio-source.js#L49-L55 (though note, avatar's default value is overridden in hub.html and both defaults can be overridden by the scene). For a description of what these values mean you can check out https://developer.mozilla.org/en-US/docs/Web/API/PannerNode. I don't suspect you are going to be able to boil it down to a single value since the |
Beta Was this translation helpful? Give feedback.
It sounds like you are wanting to play with the
PannerNode
settings. These wont be reflected at all in theGainNode
's gain value (the only thing that will change that are the volume buttons on the avatar).The relevant (default) settings are here https://github.com/mozilla/hubs/blob/master/src/components/media-views.js#L205-L211 for media and here for avatars https://github.com/mozilla/hubs/blob/master/src/components/avatar-audio-source.js#L49-L55 (though note, avatar's default value is overridden in hub.html and both defaults can be overridden by the scene).
For a description of what these values mean you can check out https://developer.mozilla.org/en-US/docs/Web/API/PannerNode.
I don't …