Mercurial > hg > beaglert
comparison examples/04-Audio/bucket-brigade-chorus/render.cpp @ 544:cdabbaf3a252 prerelease
Updated Audio examples for audioOutChannels etc.
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Fri, 24 Jun 2016 13:32:07 +0100 |
parents | 8fcfbfb32aa0 |
children |
comparison
equal
deleted
inserted
replaced
543:8f8809c77dda | 544:cdabbaf3a252 |
---|---|
62 // gPRU->clearGPIOTestPin(); | 62 // gPRU->clearGPIOTestPin(); |
63 } | 63 } |
64 | 64 |
65 bool setup(BelaContext *context, void *userData) | 65 bool setup(BelaContext *context, void *userData) |
66 { | 66 { |
67 // Check that we have the same number of inputs and outputs. | |
68 if(context->audioInChannels != context->audioOutChannels || | |
69 context->analogInChannels != context-> analogOutChannels){ | |
70 printf("Error: for this project, you need the same number of input and output channels.\n"); | |
71 return false; | |
72 } | |
73 | |
67 gInverseSampleRate = 1.0/context->audioSampleRate; | 74 gInverseSampleRate = 1.0/context->audioSampleRate; |
68 | 75 |
69 gPhase1 = 0.0; | 76 gPhase1 = 0.0; |
70 gPhase2 = 0.0; | 77 gPhase2 = 0.0; |
71 | 78 |