Skip to content

Instantly share code, notes, and snippets.

@mhroth
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhroth/1fef5d8cd6948af47af9 to your computer and use it in GitHub Desktop.
Save mhroth/1fef5d8cd6948af47af9 to your computer and use it in GitHub Desktop.
Heavy API: Patch
/**
* Creates a new patch instance.
* @param sampleRate Must be positive and in Hertz.
*
* @returns An allocated instance of the heavy patch.
* DO NOT manually free this instance. Use hv_heavy_free() below.
*/
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.
* @param inputBuffers An array of arrays; a block of n samples for each input channel.
* @param outputBuffers An array of arrays; a block of n samples for each output channel.
* @param n The block size (the number of samples per block). Must be a non-zero multiple of 1, 4, or 8,
* depending on what underlying hardware support is used (i.e. none, SSE or NEON, AVX, respectively).
*
* @returns The number of samples produced.
*/
int hv_heavy_process(Hv_heavy *c, float **const inputBuffers, float **const outputBuffers, int blocksize);
/**
* Processes one block of samples for a patch instance.
* @param inputBuffers A non-interleaved concatenated array of all input channels.
* @param outputBuffers A non-interleaved concatenated array of all output channels.
* @param n The block size (the number of samples per block). Must be a non-zero multiple of 1, 4, or 8,
* depending on what underlying hardware support is used (i.e. none, SSE or NEON, AVX, respectively).
*
* @returns The number of samples produced.
*/
int hv_heavy_process_inline(Hv_heavy *c, float *const inputBuffers, float *const outputBuffers, int blocksize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment