Browse Source

Rename util.hpp to common.hpp, fix include paths

tags/v0.6.0
Andrew Belt 6 years ago
parent
commit
60d98a641f
16 changed files with 22 additions and 19 deletions
  1. +1
    -1
      include/dsp/filter.hpp
  2. +2
    -1
      include/dsp/fir.hpp
  3. +1
    -1
      include/dsp/vumeter.hpp
  4. +1
    -1
      include/engine.hpp
  5. +1
    -1
      include/midi.hpp
  6. +2
    -3
      include/rack.hpp
  7. +5
    -0
      include/util/common.hpp
  8. +1
    -1
      include/widgets.hpp
  9. +1
    -2
      src/asset.cpp
  10. +1
    -2
      src/audio.cpp
  11. +1
    -1
      src/main.cpp
  12. +1
    -1
      src/util/logger.cpp
  13. +1
    -1
      src/util/random.cpp
  14. +1
    -1
      src/util/request.cpp
  15. +1
    -1
      src/util/string.cpp
  16. +1
    -1
      src/util/system.cpp

+ 1
- 1
include/dsp/filter.hpp View File

@@ -1,6 +1,6 @@
#pragma once

#include "math.hpp"
#include "util/math.hpp"


namespace rack {


+ 2
- 1
include/dsp/fir.hpp View File

@@ -1,4 +1,5 @@
#pragma once
#include "dsp/functions.hpp"


namespace rack {
@@ -30,7 +31,7 @@ inline void blackmanHarrisWindow(float *x, int n) {
inline void boxcarFIR(float *x, int n, float cutoff) {
for (int i = 0; i < n; i++) {
float t = (float)i / (n - 1) * 2.0 - 1.0;
x[i] = sincf(t * n * cutoff);
x[i] = sinc(t * n * cutoff);
}
}



+ 1
- 1
include/dsp/vumeter.hpp View File

@@ -1,6 +1,6 @@
#pragma once

#include "math.hpp"
#include "util/math.hpp"


namespace rack {


+ 1
- 1
include/engine.hpp View File

@@ -1,6 +1,6 @@
#pragma once
#include <vector>
#include "util/util.hpp"
#include "util/common.hpp"
#include <jansson.h>




+ 1
- 1
include/midi.hpp View File

@@ -1,6 +1,6 @@
#pragma once

#include "util/util.hpp"
#include "util/common.hpp"
#include <queue>
#include <vector>
#include <jansson.h>


+ 2
- 3
include/rack.hpp View File

@@ -1,10 +1,10 @@
#pragma once

#include "util/util.hpp"
// Include headers that plugins will likely use, for convenience
#include "util/common.hpp"
#include "asset.hpp"
#include "plugin.hpp"
#include "engine.hpp"
#include "gui.hpp"
#include "app.hpp"
#include "componentlibrary.hpp"

@@ -16,7 +16,6 @@ namespace rack {
// helpers
////////////////////


template <class TModuleWidget, typename... Tags>
Model *createModel(std::string manufacturer, std::string slug, std::string name, Tags... tags) {
struct TModel : Model {


include/util/util.hpp → include/util/common.hpp View File

@@ -11,6 +11,7 @@
#include <condition_variable>
#include <mutex>

// Include math utilities for convenience
#include "util/math.hpp"


@@ -67,6 +68,7 @@ T *construct(F f, V v, Args... args) {
}

////////////////////
// Random number generator
// random.cpp
////////////////////

@@ -80,6 +82,7 @@ float randomf();
float randomNormal();

////////////////////
// String utilities
// string.cpp
////////////////////

@@ -97,6 +100,7 @@ std::string extractFilename(std::string path);
std::string extractExtension(std::string path);

////////////////////
// Operating-system specific utilities
// system.cpp
////////////////////

@@ -107,6 +111,7 @@ May block, so open in a new thread.
void openBrowser(std::string url);

////////////////////
// Debug logger
// logger.cpp
////////////////////


+ 1
- 1
include/widgets.hpp View File

@@ -6,7 +6,7 @@
#include "../ext/oui-blendish/blendish.h"
#include "../ext/nanosvg/src/nanosvg.h"

#include "util/util.hpp"
#include "util/common.hpp"
#include "events.hpp"




+ 1
- 2
src/asset.cpp View File

@@ -1,6 +1,5 @@
#include "asset.hpp"
#include "util/util.hpp"
#include <assert.h>
#include "util/common.hpp"
#include <sys/stat.h> // for mkdir
#include "../ext/osdialog/osdialog.h"



+ 1
- 2
src/audio.cpp View File

@@ -1,5 +1,4 @@
#include "util/util.hpp"
#include "util/math.hpp"
#include "util/common.hpp"
#include "audio.hpp"




+ 1
- 1
src/main.cpp View File

@@ -1,4 +1,4 @@
#include "util/util.hpp"
#include "util/common.hpp"
#include "engine.hpp"
#include "gui.hpp"
#include "app.hpp"


+ 1
- 1
src/util/logger.cpp View File

@@ -1,4 +1,4 @@
#include "util/util.hpp"
#include "util/common.hpp"
#include <stdarg.h>




+ 1
- 1
src/util/random.cpp View File

@@ -1,4 +1,4 @@
#include "util/util.hpp"
#include "util/common.hpp"
#include <time.h>
#include <sys/time.h>



+ 1
- 1
src/util/request.cpp View File

@@ -1,4 +1,4 @@
#include "util/util.hpp"
#include "util/common.hpp"
#include "util/request.hpp"
#include <curl/curl.h>
#include <openssl/sha.h>


+ 1
- 1
src/util/string.cpp View File

@@ -1,4 +1,4 @@
#include "util/util.hpp"
#include "util/common.hpp"
#include <stdarg.h>
#include <algorithm>
#include <libgen.h> // for dirname and basename


+ 1
- 1
src/util/system.cpp View File

@@ -1,4 +1,4 @@
#include "util/util.hpp"
#include "util/common.hpp"

#if ARCH_WIN
#include <windows.h>


Loading…
Cancel
Save