diff include/render.h @ 0:8a575ba3ab52

Initial commit.
author andrewm
date Fri, 31 Oct 2014 19:10:17 +0100
parents
children a6beeba3a648
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/render.h	Fri Oct 31 19:10:17 2014 +0100
@@ -0,0 +1,53 @@
+/*
+ * render.h
+ *
+ *  Created on: May 28, 2014
+ *      Author: Victor Zappi
+ */
+
+#ifndef RENDER_H_
+#define RENDER_H_
+
+// uint types
+#include <stdint.h>
+
+// Mappings from pin numbers on PCB to actual DAC channels
+// This gives the DAC and ADC connectors the same effective pinout
+#define DAC_PIN0	6
+#define DAC_PIN1	4
+#define DAC_PIN2	2
+#define DAC_PIN3	0
+#define DAC_PIN4	1
+#define DAC_PIN5	3
+#define DAC_PIN6	5
+#define DAC_PIN7	7
+
+#define ADC_PIN0	0
+#define ADC_PIN1	1
+#define ADC_PIN2	2
+#define ADC_PIN3	3
+#define ADC_PIN4	4
+#define ADC_PIN5	5
+#define ADC_PIN6	6
+#define ADC_PIN7	7
+
+#define MATRIX_MAX  65535.0
+
+bool initialise_render(int numChannels, int numMatrixFramesPerPeriod,
+					   int numAudioFramesPerPeriod,
+					   float matrixSampleRate, float audioSampleRate,
+					   void *userData);
+
+void render(int numMatrixFrames, int numAudioFrames, float *audioIn, float *audioOut,
+			uint16_t *matrixIn, uint16_t *matrixOut);
+
+void render_medium_prio();
+void render_low_prio();
+
+void schedule_render_medium_prio();
+void schedule_render_low_prio();
+
+
+void cleanup_render();
+
+#endif /* RENDER_H_ */