Skip to content

Commit

Permalink
Midisynth: newlib buildfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghabry authored and carstene1ns committed Feb 5, 2022
1 parent 4043de0 commit 8bc6ee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/midisynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ namespace midisynth{
}else{
panpot = panpot * (16384 - master_balance) / 8192 + (master_balance - 8192) * 2;
}
int_least32_t left = static_cast<int_least32_t>(volume * std::cos(std::max(0, panpot - 1) * (M_PI / 2 / 16382)));
int_least32_t right = static_cast<int_least32_t>(volume * std::sin(std::max(0, panpot - 1) * (M_PI / 2 / 16382)));
int_least32_t left = static_cast<int_least32_t>(volume * std::cos(std::max<int_least32_t>(0, panpot - 1) * (M_PI / 2 / 16382)));
int_least32_t right = static_cast<int_least32_t>(volume * std::sin(std::max<int_least32_t>(0, panpot - 1) * (M_PI / 2 / 16382)));
bool ret = note->synthesize(out, samples, rate, left, right);
if(ret){
++i;
Expand Down

0 comments on commit 8bc6ee8

Please sign in to comment.