Skip to content

Commit

Permalink
Merge pull request #200 from droscoe/roscoe_altsound_bugfix_20240123
Browse files Browse the repository at this point in the history
Fix erroneous application of ducking for music samples
  • Loading branch information
toxieainc authored Jan 24, 2024
2 parents f7995d8 + f4cc46b commit 1fb9a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wpc/altsound/altsound_csv_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bool AltsoundCsvParser::parse(std::vector<AltsoundSampleInfo>& samples_out)
// DUCK
if (std::getline(ss, field, ',')) {
float val = std::stof(trim(field));
entry.ducking = val < 0.0f ? -1.0f : val > 100.0f ? 1.0f : val / 100.0f;
entry.ducking = entry.channel == 0 ? 100.0f : val < 0.0f ? -1.0f : val > 100.0f ? 1.0f : val / 100.0f;
}
else {
ALT_ERROR(0, "Failed to parse sample DUCK value");
Expand Down

0 comments on commit 1fb9a87

Please sign in to comment.