mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-15 12:08:33 +00:00
Introduces an SConstruct file and corrects those errors and warnings that arise in Ubuntu.
This commit is contained in:
parent
9fd33bdfde
commit
c45d4831ec
@ -9,10 +9,12 @@
|
|||||||
#ifndef AsyncTaskQueue_hpp
|
#ifndef AsyncTaskQueue_hpp
|
||||||
#define AsyncTaskQueue_hpp
|
#define AsyncTaskQueue_hpp
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <functional>
|
||||||
|
#include <list>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <list>
|
|
||||||
#include <condition_variable>
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <dispatch/dispatch.h>
|
#include <dispatch/dispatch.h>
|
||||||
|
20
OSBindings/SDL/SConstruct
Normal file
20
OSBindings/SDL/SConstruct
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import glob
|
||||||
|
|
||||||
|
# create build environment
|
||||||
|
env = Environment()
|
||||||
|
|
||||||
|
# determine compiler and linker flags for SDL
|
||||||
|
env.ParseConfig('sdl2-config --cflags')
|
||||||
|
env.ParseConfig('sdl2-config --libs')
|
||||||
|
|
||||||
|
# gather a list of source files
|
||||||
|
SOURCES = glob.glob('*.cpp')
|
||||||
|
|
||||||
|
# add additional compiler flags
|
||||||
|
env.Append(CCFLAGS = ['-g', '-Wall', '--std=c++11'])
|
||||||
|
# add additional libraries to link against
|
||||||
|
env.Append(LIBS = ['libz'])
|
||||||
|
|
||||||
|
# build target
|
||||||
|
# output executable will be "game"
|
||||||
|
env.Program(target = 'game', source = SOURCES)
|
@ -13,7 +13,7 @@
|
|||||||
#include "CRTConstants.hpp"
|
#include "CRTConstants.hpp"
|
||||||
#include "OpenGL.hpp"
|
#include "OpenGL.hpp"
|
||||||
#include "TextureTarget.hpp"
|
#include "TextureTarget.hpp"
|
||||||
#include "Shader.hpp"
|
#include "Shaders/Shader.hpp"
|
||||||
|
|
||||||
#include "ArrayBuilder.hpp"
|
#include "ArrayBuilder.hpp"
|
||||||
#include "TextureBuilder.hpp"
|
#include "TextureBuilder.hpp"
|
||||||
|
@ -34,8 +34,8 @@ struct Flywheel {
|
|||||||
retrace_time_(retrace_time),
|
retrace_time_(retrace_time),
|
||||||
sync_error_window_(sync_error_window),
|
sync_error_window_(sync_error_window),
|
||||||
counter_(0),
|
counter_(0),
|
||||||
expected_next_sync_(standard_period),
|
|
||||||
counter_before_retrace_(standard_period - retrace_time),
|
counter_before_retrace_(standard_period - retrace_time),
|
||||||
|
expected_next_sync_(standard_period),
|
||||||
number_of_surprises_(0) {}
|
number_of_surprises_(0) {}
|
||||||
|
|
||||||
enum SyncEvent {
|
enum SyncEvent {
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
#include <OpenGL/gl3.h>
|
#include <OpenGL/gl3.h>
|
||||||
#include <OpenGL/gl3ext.h>
|
#include <OpenGL/gl3ext.h>
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#include <GL/gl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* OpenGL_h */
|
#endif /* OpenGL_h */
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef Shader_hpp
|
#ifndef Shader_hpp
|
||||||
#define Shader_hpp
|
#define Shader_hpp
|
||||||
|
|
||||||
#include "OpenGL.hpp"
|
#include "../OpenGL.hpp"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -31,11 +31,6 @@ using namespace SignalProcessing;
|
|||||||
"DIGITAL SIGNAL PROCESSING, II", IEEE Press, pages 123–126.
|
"DIGITAL SIGNAL PROCESSING, II", IEEE Press, pages 123–126.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// our little fixed point scheme
|
|
||||||
#define kCSKaiserBesselFilterFixedMultiplier 32767.0f
|
|
||||||
#define kCSKaiserBesselFilterFixedShift 15
|
|
||||||
|
|
||||||
/*! Evaluates the 0th order Bessel function at @c a. */
|
/*! Evaluates the 0th order Bessel function at @c a. */
|
||||||
float FIRFilter::ino(float a) {
|
float FIRFilter::ino(float a) {
|
||||||
float d = 0.0f;
|
float d = 0.0f;
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <Accelerate/Accelerate.h>
|
#include <Accelerate/Accelerate.h>
|
||||||
|
#else
|
||||||
|
#define kCSKaiserBesselFilterFixedMultiplier 32767.0f
|
||||||
|
#define kCSKaiserBesselFilterFixedShift 15
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace SignalProcessing {
|
namespace SignalProcessing {
|
||||||
|
@ -87,10 +87,10 @@ class Stepper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint64_t whole_step_;
|
|
||||||
int64_t adjustment_up_, adjustment_down_;
|
|
||||||
int64_t accumulated_error_;
|
int64_t accumulated_error_;
|
||||||
uint64_t input_rate_, output_rate_;
|
uint64_t input_rate_, output_rate_;
|
||||||
|
uint64_t whole_step_;
|
||||||
|
int64_t adjustment_up_, adjustment_down_;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user