Mercurial > hg > beaglert
comparison scripts/hvresources/render.cpp @ 329:9a2a5f14b587 prerelease
Updated build_pd_heavy to work with the latest makefile.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sat, 04 Jun 2016 14:10:45 +0100 |
parents | 156e6955ccf6 |
children | 9dc5a0ccad25 |
comparison
equal
deleted
inserted
replaced
328:abd7795dad5d | 329:9a2a5f14b587 |
---|---|
9 * | 9 * |
10 * Christian Heinrichs | 10 * Christian Heinrichs |
11 * | 11 * |
12 */ | 12 */ |
13 | 13 |
14 #include <BeagleRT.h> | 14 #include <Bela.h> |
15 #include <Midi.h> | 15 #include <Midi.h> |
16 #include <cmath> | 16 #include <cmath> |
17 #include "../include/Utilities.h" | 17 #include "../include/Utilities.h" |
18 #include "Heavy_bbb.h" | 18 #include "Heavy_bbb.h" |
19 #include <string.h> | 19 #include <string.h> |
52 /* | 52 /* |
53 * SETUP, RENDER LOOP & CLEANUP | 53 * SETUP, RENDER LOOP & CLEANUP |
54 */ | 54 */ |
55 | 55 |
56 Midi midi; | 56 Midi midi; |
57 bool setup(BeagleRTContext *context, void *userData) { | 57 bool setup(BelaContext *context, void *userData) { |
58 | 58 |
59 /* HEAVY */ | 59 /* HEAVY */ |
60 | 60 |
61 gHeavyContext = hv_bbb_new(context->audioSampleRate); | 61 gHeavyContext = hv_bbb_new(context->audioSampleRate); |
62 | 62 |
85 midi.enableParser(true); | 85 midi.enableParser(true); |
86 return true; | 86 return true; |
87 } | 87 } |
88 | 88 |
89 | 89 |
90 void render(BeagleRTContext *context, void *userData) | 90 void render(BelaContext *context, void *userData) |
91 { | 91 { |
92 | 92 |
93 // De-interleave the data | 93 // De-interleave the data |
94 if(gHvInputBuffers != NULL) { | 94 if(gHvInputBuffers != NULL) { |
95 for(int n = 0; n < context->audioFrames; n++) { | 95 for(int n = 0; n < context->audioFrames; n++) { |
172 } | 172 } |
173 | 173 |
174 } | 174 } |
175 | 175 |
176 | 176 |
177 void cleanup(BeagleRTContext *context, void *userData) | 177 void cleanup(BelaContext *context, void *userData) |
178 { | 178 { |
179 | 179 |
180 hv_bbb_free(gHeavyContext); | 180 hv_bbb_free(gHeavyContext); |
181 if(gHvInputBuffers != NULL) | 181 if(gHvInputBuffers != NULL) |
182 free(gHvInputBuffers); | 182 free(gHvInputBuffers); |