|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003150||FSSCP||SEXPs||public||2015-03-17 22:42||2015-04-10 20:18|
|Product Version||3.7.2 RC5|
|Target Version||Fixed in Version|
|Summary||0003150: Adjusting music volume doesn't work with sexps|
|Description||In the sexp_adjust_audio_volume() function (line 10487ish) there's a lookup function to see what selected option corresponds with its integer index. Music is 0, Effects is 1, Voice is 2. The issue occurs after the look up when we get...|
if (option > 0)
Which won't include music (0). *Sadfaec*
Can we get an extra equals sign up in there?
|Tags||No tags attached.|
|Seems straightforward enough.|
|Seems fine to me, I just haven't tested running the sexp|
|Actually, I'm unassigning this from me because it's really Axem's fix; I just turned it into a .patch file.|
Last edited: 2015-03-18 06:20
I've tested the change and I think there's another issue here. I set the music volume to 0% at 5 secs, then back to 100% at 20 secs with "$Event Music: 5: Deuteronomy". The music doesn't change volume at 5 secs, and it fades away completely just before 20 secs and doesn't return (ever!) unless I modify the volume in the F2 Options screen, or press escape, or take some other action.
Anyway, I'm poking around further to see if I can figure out what's going on.
Update: music from play-sound-from-file also doesn't change volume. I suspect that there's nothing (re)setting the music volume except when a track starts, e.g. when event music switches, or a loop restarts.
Update2: I think I've found the issue and have added code to trigger a volume change for all music when the music volume is changed. See attached patch mantis3150-svn.patch. I've tested this with event music and play-sound-from-file. Could you give it a test to see if it works as expected in your test case(s) as well?
|Here's a binary to test with: http://www.mediafire.com/download/icrdaaa73rrpi93/fs2_open_3_7_1_SSE2_mantis3150.7z|
The build didn't seem to have the patch applied since it didn't fix the problem.
But I took the patch and applied it to my own stuff here and the resulting build fixed all the issues.
I have really got to test those Windows builds before publishing them... regardless, thanks for testing!
|Fix committed to trunk@11299.|
fs2open: trunk r11299
Timestamp: 2015-04-10 20:40:31
|Fix mantis 3150
Use and set music volume changes requested by sexp_adjust_audio_volume()
|mod - /trunk/fs2_open/code/parse/sexp.cpp|
|mod - /trunk/fs2_open/code/sound/sound.cpp|
|2015-03-17 22:42||Axem||New Issue|
|2015-03-17 23:42||MageKing17||Note Added: 0016566|
|2015-03-17 23:42||MageKing17||Assigned To||=> MageKing17|
|2015-03-17 23:42||MageKing17||Status||new => code review|
|2015-03-17 23:45||MageKing17||File Added: sexp.cpp.patch|
|2015-03-18 00:09||niffiwan||Note Added: 0016567|
|2015-03-18 02:12||MageKing17||Note Added: 0016569|
|2015-03-18 02:12||MageKing17||Assigned To||MageKing17 =>|
|2015-03-18 05:13||niffiwan||Note Added: 0016570|
|2015-03-18 05:59||niffiwan||Note Edited: 0016570||View Revisions|
|2015-03-18 06:18||niffiwan||File Added: mantis3150-svn.patch|
|2015-03-18 06:20||niffiwan||Note Edited: 0016570||View Revisions|
|2015-03-18 18:02||MageKing17||File Deleted: sexp.cpp.patch|
|2015-03-18 18:02||MageKing17||Assigned To||=> niffiwan|
|2015-03-18 18:02||MageKing17||Status||code review => assigned|
|2015-03-18 18:03||MageKing17||Status||assigned => code review|
|2015-03-28 00:16||niffiwan||Note Added: 0016583|
|2015-04-07 21:39||Axem||Note Added: 0016612|
|2015-04-10 20:17||niffiwan||Note Added: 0016638|
|2015-04-10 20:18||niffiwan||Changeset attached||=> fs2open trunk r11299|
|2015-04-10 20:18||niffiwan||Note Added: 0016639|
|2015-04-10 20:18||niffiwan||Status||code review => resolved|
|2015-04-10 20:18||niffiwan||Resolution||open => fixed|