Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: 0.97a-RC7: Music ignores "volume" field in sounds.json  (Read 202 times)

chdcl

  • Ensign
  • *
  • Posts: 3
    • View Profile
0.97a-RC7: Music ignores "volume" field in sounds.json
« on: February 08, 2024, 01:24:54 PM »

Seems like in 0.97a-RC7, the "volume" field has no effect for music entries in starsector-core/data/config/sounds.json.
Entries of music_campaign, music_campaign_hyperspace and maybe music_campaign_non_core are always played as if volume was 1. This is very noticeable when playing with a mod like Audio Plus which has some very small volume multipliers like 0.2 on one track, resulting in that track playing 5 times as loudly on 0.97a.
Sound effects and title music work fine.

This is happening to me on a fresh install of Starsector 0.97a-RC7, Windows 10, no mods and zero changes to the JRE or settings or vmparams.
To reproduce:
1. Open starsector-core/data/config/sounds.json
2. Replace
Code
"music_campaign":[
    {"file":"miscallenous_corvus_campaign_music.ogg","source":"sounds/music/music.bin","volume":1},
]
with
Code
"music_campaign":[
    {"file":"scavenge_music_v1.ogg","source":"sounds/music/music.bin","volume":0},
]
This sets the volume to 0 so no audio should play, but also changes the track to the scavenge music to demonstrate that the change is in effect.
3. Start a new playthrough with the tutorial, so music_campaign starts playing

Expected behavior: No music plays because volume of music_campaign is set to 0
Observed behavior: The scavenge music plays as if volume was set to 1

In 0.96a, these exact steps lead to the expected behavior.
There's also some weird behavior where the sound volume is correct if you tab out right after the loading finishes, but it is set to 1 when you tab back in.


Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24148
    • View Profile
Re: 0.97a-RC7: Music ignores "volume" field in sounds.json
« Reply #1 on: February 08, 2024, 04:11:02 PM »

Thank you for the report! Ouch, made a note; will take a look at what's going on here.
Logged

Serenitis

  • Admiral
  • *****
  • Posts: 1471
    • View Profile
Re: 0.97a-RC7: Music ignores "volume" field in sounds.json
« Reply #2 on: February 16, 2024, 02:55:17 AM »

Is anyone else still seeing this in RC10?

I think I am.
Logged

David

  • Global Moderator
  • Admiral
  • *****
  • Posts: 914
    • View Profile
Re: 0.97a-RC7: Music ignores "volume" field in sounds.json
« Reply #3 on: February 16, 2024, 05:29:40 AM »

Is anyone else still seeing this in RC10?

I think I am.

Ah, to clarify, can you describe in more detail what's happening (or not) with your game? Like, does the music volume control simply not work at all? Or does it work only in certain contexts?

And you are indeed on RC10, and no mods that change sound settings?

I pulled the latest build here and it seems to work as intended set to full volume, no volume, partial volume and appears to work in multiple contexts eg. in dialogs, in campaign exploration mode, etc. If you can give any additional info, that'd be appreciated!
Logged

Serenitis

  • Admiral
  • *****
  • Posts: 1471
    • View Profile
Re: 0.97a-RC7: Music ignores "volume" field in sounds.json
« Reply #4 on: February 16, 2024, 07:36:24 AM »

There is a noticable difference in volume between the music which plays on the map/campaign, and that which plays in a market/encounter/interaction.
The campaign music seems noticeably louder, to the point that setting it at a comfortable level makes everything else very faint.

The in-game volume controls do work as intended, but due to the above it's difficult to find a good place to set them.

Changing the values in sounds.json both does and does not work.
It does work as you can set the value to 0 and that music will no longer be audible.
It doesn't work as the music returns to its 'full' volume level when you:
  • Dock and start the market music, then leave. (only seems to trigger on the following markets)
    • Hegemony
    • League
    • Path
    • Church
    • Unclaimed/Abandoned (although not all entities seem to produce this trigger)
  • Transition to and then from hyperspace (again, not every instance will trigger)

Saving, exiting the game back to the menu and then re-loading resets the volume levels back to whatever is in the json.

No mods.
Although mods do seem to make the issue stand out much more.

What's really confusing is that everything seems to be the same as older versions which had no such issues, barring additional entries for new content.
Logged

David

  • Global Moderator
  • Admiral
  • *****
  • Posts: 914
    • View Profile
Re: 0.97a-RC7: Music ignores "volume" field in sounds.json
« Reply #5 on: February 16, 2024, 07:56:55 AM »

Thank you for the detailed breakdown, that's super useful! I, for one, know nothing about how this works but I imagine your feedback will be valuable to Alex. *thumbs up*
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24148
    • View Profile
Re: 0.97a-RC7: Music ignores "volume" field in sounds.json
« Reply #6 on: February 16, 2024, 11:43:30 AM »

Fixed for the next hotfix.
Logged