Last active
August 29, 2015 14:00
-
-
Save mhroth/11298616 to your computer and use it in GitHub Desktop.
Tannhäuser API: Common
This file contains 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
#pragma mark - Tannhäuser Common | |
#ifndef _TANNHAUSER_COMMON_H_ | |
#define _TANNHAUSER_COMMON_H_ | |
typedef void Tannhauser; | |
/** Returns the block size with which this patch has been configured. */ | |
int th_getBlockSize(Tannhauser *c); | |
/** Returns the sample rate with which this patch has been configured. */ | |
double th_getSampleRate(Tannhauser *c); | |
/** Returns the number of input channels with which this patch has been configured. */ | |
int th_getNumInputChannels(Tannhauser *c); | |
/** Returns the number of output channels with which this patch has been configured. */ | |
int th_getNumOutputChannels(Tannhauser *c); | |
/** Set the print hook. The function is called whenever a message is sent to a print object. */ | |
void th_setPrintHook(Tannhauser *c, void (*f)(double timestamp, const char *printName, const char *message)); | |
/** | |
* Set the send hook. The function is called whenever a message is sent to any send object. | |
* Messages returned by this function should NEVER be freed. If the message must persist, call | |
* th_msg_copy() first. | |
*/ | |
void th_setSendHook(Tannhauser *c, void (*f)(const char *receiverName, PdMessage *m)); | |
void th_vscheduleMessageForReceiver( | |
Tannhauser *c, const char *receiverName, double timestamp, const char *format, ...); | |
/** Cancels a previously scheduled message. */ | |
void th_cancelMessage(Tannhauser *c, PdMessage *m); | |
/** Returns a table object given its name. NULL if no table with that name exists. */ | |
PdTable *th_getTableForName(Tannhauser *c, const char *tableName); | |
/** Returns the current patch time in milliseconds. */ | |
double th_getCurrentTime(Tannhauser *c); | |
/** Sets a user-definable value. This value is never manipulated by Tannhäuser. */ | |
void th_setUserData(Tannhauser *c, void *userData); | |
/** Returns the user-defined data. */ | |
void *th_getUserData(Tannhauser *c); | |
/** Define the base path of the patch. Used as the root path to locate assets. */ | |
void th_setBasePath(Tannhauser *c, const char *basePath); | |
#endif // _TANNHAUSER_COMMON_H_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment