3cc6a9041d38 — Vesa Norilo 2 years ago
clean up kc.cpp and reset ubuntu version
4 files changed, 4 insertions(+), 67 deletions(-)

M .builds/ubuntu.yml
M .builds/wasm.yml
M .hgsubstate
M src/driver/kc.cpp
M .builds/ubuntu.yml +1 -1
@@ 1,6 1,6 @@ 
 image: ubuntu/20.04
 packages:
-- cmake g++ python3 libsndfile-dev libtinyxml-dev libreadline6-dev llvm-6.0-dev libcurl4-openssl-dev zlib1g-dev
+- cmake g++ python3 libsndfile-dev libtinyxml-dev libreadline6-dev llvm-6.0-dev libcurl4-openssl-dev zlib1g-dev libjack-dev
 sources:
 - hg+https://hg.sr.ht/~vnorilo/kronos
 tasks:

          
M .builds/wasm.yml +1 -1
@@ 21,4 21,4 @@ tasks:
 triggers:
 - action: email
   condition: failure
-  to: <vn@imap.cc>a
  No newline at end of file
+  to: <vn@imap.cc>
  No newline at end of file

          
M .hgsubstate +1 -1
@@ 1,4 1,4 @@ 
-7f81123f735fe08e69c218a328e4114c47a3feec library
+accd03c99f036645d3f5989c8deefb01e52c59a9 library
 8b4b21f3c6f21d1e6eb60d7b0debfb74597ca2f5 src/lithe
 d88ce622aaf77f683bb589f1089ea1ba51423818 src/pad
 29a29937ee1095e5ddf1655902f1ed09c810bbf3 src/paf

          
M src/driver/kc.cpp +1 -64
@@ 202,67 202,4 @@ int main(int n, const char *carg[]) {
 		return -1;
 	}
  	return 0;  
-} 
-
-#pragma once
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#pragma pack(push)
-#pragma pack(1)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-	typedef void* InstancePtr;
-
-	int64_t GetSize();
-	void Initialize(InstancePtr, void*);
-	void** GetValue(InstancePtr, int32_t slotIndex);
-	static void SetFreq(InstancePtr instance, const float* Freq) {
-		*GetValue(instance, 0) = (void*)Freq;
-	}
-
-	void TickFreq(InstancePtr, float* outputBuffer, int32_t numFrames);
-	void TickAudio(InstancePtr, float* outputBuffer, int32_t numFrames);
-
-	// You must set this before calling `Initialize()`
-	static void Set_RateAudio(InstancePtr instance, const float* _RateAudio) {
-		*GetValue(instance, 1) = (void*)_RateAudio;
-	}
-
-
-	// Convenience constructor for allocating memory, setting configuration and initializing an instance
-	static InstancePtr Construct(const float* _RateAudio) {
-		void* memory = calloc(1, GetSize());
-		Set_RateAudio(memory, _RateAudio);
-		Initialize(memory, NULL);
-		return memory;
-	}
-
-#ifdef __cplusplus
-}
-
-// c++ wrapper
-class Dsp {
-	InstancePtr instance = nullptr;
-public:
-	Dsp(const float* _RateAudio) { instance = Construct(_RateAudio); }
-	~Dsp() { if (instance) free(instance); }
-#if __cplusplus > 199711L
-	Dsp(Dsp const&) = delete;
-	Dsp(Dsp&& from) { instance = from.instance; from.instance = nullptr; };
-	void operator=(Dsp const&) = delete;
-	Dsp& operator=(Dsp&& from) { auto tmp = from.instance; from.instance = instance; instance = tmp; }
-#endif
-
-	void SetFreq(const float* inputBuffer) { ::SetFreq(instance, inputBuffer); }
-	void TickFreq(float* outputBuffer, int32_t numFrames = 1) { ::TickFreq(instance, outputBuffer, numFrames); }
-	void TickAudio(float* outputBuffer, int32_t numFrames = 1) { ::TickAudio(instance, outputBuffer, numFrames); }
-};
-
-
-#endif
-#pragma pack(pop)
  No newline at end of file
+} 
  No newline at end of file