Created
August 14, 2016 05:21
-
-
Save Skrylar/7136cc07c49f7fa2d08e1ec4eb25f0d4 to your computer and use it in GitHub Desktop.
Triage patch to build on Arch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 7452eb01a2b5bf4143c0a478e109fee44df69c4f Mon Sep 17 00:00:00 2001 | |
From: Joshua Cearley <joshua.cearley@gmail.com> | |
Date: Sun, 14 Aug 2016 00:17:33 -0500 | |
Subject: [PATCH] Triage to get things building. | |
--- | |
src/analyzer.cpp | 6 +++--- | |
src/jack_client.cpp | 2 +- | |
src/modules_dist.cpp | 4 ++-- | |
src/modules_limit.cpp | 4 ++-- | |
4 files changed, 8 insertions(+), 8 deletions(-) | |
diff --git a/src/analyzer.cpp b/src/analyzer.cpp | |
index fd42188..3ea2fed 100644 | |
--- a/src/analyzer.cpp | |
+++ b/src/analyzer.cpp | |
@@ -471,12 +471,12 @@ void analyzer::draw(int subindex, float *data, int points, bool fftdone) const | |
//pumping up actual signal an erase surrounding | |
// sounds | |
fft_outL[_iter] = 0.25f * std::max(n * 0.6f * \ | |
- fabs(fft_outL[_iter]) - var1L , 1e-20); | |
+ fabs((double)(fft_outL[_iter]) - var1L) , (double)(1e-20)); | |
if(_mode == 3 or _mode == 4) { | |
// do the same with R channel if needed | |
lastoutR = fft_outR[_iter]; | |
- fft_outR[_iter] = 0.25f * std::max(n * \ | |
- 0.6f * fabs(fft_outR[_iter]) - var1R , 1e-20); | |
+ fft_outR[_iter] = 0.25f * std::max((double)(n * \ | |
+ 0.6f * fabs(fft_outR[_iter]) - var1R) , (double)(1e-20)); | |
} | |
break; | |
} | |
diff --git a/src/jack_client.cpp b/src/jack_client.cpp | |
index 886d51e..c093c13 100644 | |
--- a/src/jack_client.cpp | |
+++ b/src/jack_client.cpp | |
@@ -226,7 +226,7 @@ void jack_client::calculate_plugin_order(std::vector<int> &indices) | |
map<string, int>::const_iterator p = port_to_plugin.find((*k) + cnlen + 1); | |
if (p != port_to_plugin.end()) | |
{ | |
- run_before.insert(make_pair<int, int>(p->second, i)); | |
+ run_before.insert(make_pair<int, int>((int)p->second, (int)i)); | |
} | |
} | |
jack_free(conns); | |
diff --git a/src/modules_dist.cpp b/src/modules_dist.cpp | |
index 4b1b7f9..b0708bf 100644 | |
--- a/src/modules_dist.cpp | |
+++ b/src/modules_dist.cpp | |
@@ -794,8 +794,8 @@ uint32_t tapesimulator_audio_module::process(uint32_t offset, uint32_t numsample | |
lfo2.advance(1); | |
// dot | |
- rms = std::max((double)rms, (fabs(Lo) + fabs(Ro)) / 2); | |
- input = std::max((double)input, (fabs(Lc) + fabs(Rc)) / 2); | |
+ rms = std::max((double)rms, (double)((fabs(Lo) + fabs(Ro)) / 2)); | |
+ input = std::max((double)input, (double)((fabs(Lc) + fabs(Rc)) / 2)); | |
float values[] = {inL, inR, outs[0][i], outs[1][i]}; | |
meters.process(values); | |
diff --git a/src/modules_limit.cpp b/src/modules_limit.cpp | |
index 6b7dcb6..79b7939 100644 | |
--- a/src/modules_limit.cpp | |
+++ b/src/modules_limit.cpp | |
@@ -429,7 +429,7 @@ uint32_t multibandlimiter_audio_module::process(uint32_t offset, uint32_t numsam | |
} | |
// write multiband coefficient to buffer | |
- buffer[pos] = std::min(*params[param_limit] / std::max(fabs(tmpL), fabs(tmpR)), 1.0); | |
+ buffer[pos] = std::min((double)(*params[param_limit]) / (double)(std::max(fabs(tmpL), fabs(tmpR))), (double)1.0); | |
// step forward in multiband buffer | |
pos = (pos + channels) % buffer_size; | |
@@ -811,7 +811,7 @@ uint32_t sidechainlimiter_audio_module::process(uint32_t offset, uint32_t numsam | |
} | |
// write multiband coefficient to buffer | |
- buffer[pos] = std::min(*params[param_limit] / std::max(fabs(tmpL), fabs(tmpR)), 1.0); | |
+ buffer[pos] = std::min(*params[param_limit] / std::max((double)(fabs(tmpL)), (double)(fabs(tmpR))), 1.0); | |
// step forward in multiband buffer | |
pos = (pos + channels) % buffer_size; | |
-- | |
2.9.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment