This file contains hidden or 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
CC = clang | |
CXX = clang++ | |
MKDIR = mkdir -p | |
SRC_DIR = ../source | |
WWISE_SDK_DIR = /home/osiris/Desktop/Wwise/SDK/include | |
PATCH_NAME = sine | |
OUT_DIR = ../build/unix | |
BASEFLAGS = -I$(WWISE_SDK_DIR) -I$(SRC_DIR) -I$(SRC_DIR)/include -I$(SRC_DIR)/heavy -DNDEBUG -msse4.1 -O3 -ffast-math -std=c11 -fPIC -Werror -Wno-unused-function -Wno-\#warnings | |
CFLAGS = $(BASEFLAGS) -std=c11 | |
CXXFLAGS = $(BASEFLAGS) -std=c++11 -Wno-deprecated-writable-strings -fno-exceptions -fno-rtti |
This file contains hidden or 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
/** | |
* Resizes the table to the given length. Length must be positive. | |
* Existing contents are copied to the new table. Remaining space is cleared. | |
*/ | |
void hv_table_resize(PdTable *o, hv_uint32_t newLength); | |
/** Returns a pointer to the raw buffer backing this table. DO NOT free it. */ | |
float *hv_table_getBuffer(PdTable *o); | |
/** Returns the length of this table in samples. */ |
This file contains hidden or 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
/** Returns the byte size of a HvMessage with a number of elements on the heap. */ | |
hv_size_t hv_msg_getByteSize(int numElements); | |
/** Create a HvMessage on the stack with a number of elements. This message does MUST NOT be freed. */ | |
HvMessage *hv_msg_onStack(hv_uint32_t numElements) { | |
return (HvMessage *) hv_alloca(hv_msg_getByteSize(numElements)); // this will not work until Utils.h is included | |
} | |
/** Initialise a message with the number of elements and a timestamp (in milliseconds). */ | |
void hv_msg_init(HvMessage *m, int numElements, double timestamp); |
This file contains hidden or 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
/** Returns the sample rate with which this patch has been configured. */ | |
double hv_getSampleRate(Heavy *c); | |
/** Returns the number of input channels with which this patch has been configured. */ | |
int hv_getNumInputChannels(Heavy *c); | |
/** Returns the number of output channels with which this patch has been configured. */ | |
int hv_getNumOutputChannels(Heavy *c); | |
/** Set the print hook. The function is called whenever a message is sent to a print object. */ |
This file contains hidden or 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
/** | |
* Creates a new patch instance. | |
* Sample rate should be positive and in Hertz. | |
*/ | |
Hv_heavy *hv_heavy_new(double sampleRate); | |
/** Frees a patch instance. */ | |
void hv_heavy_free(Hv_heavy *c); | |
/** Processes one block of samples for a patch instance. The buffer format is an array of arrays. */ |
This file contains hidden or 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
#include <stdio.h> | |
#include "Heavy_heavy.h" | |
void printHook(double timestampSecs, const char *printLabel, const char *msgString, void *userData) { | |
printf("[@ %.3f] %s: %s\n", timestampSecs, printLabel, msgString); | |
} | |
int main(int argc, const char *argv[]) { | |
Hv_heavy *context = hv_heavy_new(0, 0, 44100.0); | |
This file contains hidden or 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
#include "Heavy_heavy.h" | |
int main(int argc, const char *argv[]) { | |
Hv_heavy *context = hv_heavy_new(44100.0); | |
// create a message with the contents 'test-value 0.5f' | |
int numElements = 2; | |
HvMessage *msg = (HvMessage *) hv_alloca(hv_msg_getByteSize(numElements)); | |
hv_msg_init(msg, numElements, 0.0); | |
hv_msg_setSymbol(msg, 0, "test-value"); |
This file contains hidden or 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
#include <mm_malloc.h> | |
#include "Heavy_heavy.h" | |
int main(int argc, const char *argv[]) { | |
double sampleRate = 44100.0; | |
Hv_heavy *context = hv_heavy_new(sampleRate); | |
int numOutputChannels = hv_getNumOutputChannels(context); | |
int numIterations = 100; |
This file contains hidden or 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
#include <mm_malloc.h> | |
#include "Heavy_heavy.h" | |
int main(int argc, const char *argv[]) { | |
double sampleRate = 44100.0; | |
Hv_heavy *context = hv_heavy_new(sampleRate); | |
int numOutputChannels = hv_getNumOutputChannels(context); | |
int numIterations = 100; |
This file contains hidden or 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
#include "Heavy_heavy.h" | |
int main(int argc, const char *argv[]) { | |
double sampleRate = 44100.0; | |
Hv_heavy *context = hv_heavy_new(sampleRate); | |
int numInputChannels = hv_getNumInputChannels(context); | |
int numOutputChannels = hv_getNumOutputChannels(context); | |
NewerOlder