BogaudioModules

BogaudioModules for VCV Rack
Log | Files | Refs | README | LICENSE

commit 4c2b313bc32f1abd8f9002f990adbd382f420352
parent 49ce45de6215fddf816025c63472c7072bbca89d
Author: Matt Demanett <matt@demanett.net>
Date:   Fri,  5 Jan 2018 00:59:04 -0500

Linux compile warning and benchmark build fixes.

Diffstat:
MMakefile | 2+-
Mbenchmarks/analyzer.cpp | 3++-
Mbenchmarks/buffer.cpp | 2+-
Msrc/dsp/oscillator.cpp | 3++-
4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -17,7 +17,7 @@ BENCHMARK_OBJECTS = $(patsubst %, build/%.o, $(BENCHMARK_SOURCES)) BENCHMARK_DEPS = $(patsubst %, build/%.d, $(BENCHMARK_SOURCES)) -include $(BENCHMARK_DEPS) benchmark: $(BENCHMARK_OBJECTS) - $(CXX) -o $@ $^ ../../build/src/util.cpp.o -lbenchmark + $(CXX) -o $@ $^ ../../build/src/util.cpp.o -lbenchmark -lpthread benchmark_clean: rm -f benchmark clean: benchmark_clean diff --git a/benchmarks/analyzer.cpp b/benchmarks/analyzer.cpp @@ -84,7 +84,8 @@ static void BM_SpectrumAnalyzerStep(benchmark::State& state) { int i = 0; for (auto _ : state) { sa.step(in[i]); - i = ++i % 8; + ++i; + i %= 8; } } BENCHMARK(BM_SpectrumAnalyzerStep); diff --git a/benchmarks/buffer.cpp b/benchmarks/buffer.cpp @@ -7,7 +7,7 @@ using namespace bogaudio::dsp; struct BMOverlappingBuffer : OverlappingBuffer<float> { BMOverlappingBuffer(int size, int o) : OverlappingBuffer(size, o) {} - virtual void process(float* samples) {} + virtual void process(float* samples) override {} }; static void BM_OverlappingBuffer(benchmark::State& state) { diff --git a/src/dsp/oscillator.cpp b/src/dsp/oscillator.cpp @@ -30,6 +30,7 @@ float SineOscillator::_next() { } } float out = _y[_step]; - _step = ++_step % _n; + ++_step; + _step %= _n; return out; }