comparison examples/10-Instruments/tank-wars/render.cpp @ 543:8f8809c77dda prerelease

updated basics, digital, instruments, extras examples
author chnrx <chris.heinrichs@gmail.com>
date Fri, 24 Jun 2016 13:19:52 +0100
parents a23d74e2f6cb
children
comparison
equal deleted inserted replaced
542:3016638b4da2 543:8f8809c77dda
91 91
92 bool setup(BelaContext *context, void *userData) 92 bool setup(BelaContext *context, void *userData)
93 { 93 {
94 srandom(time(NULL)); 94 srandom(time(NULL));
95 95
96 // Verify we are running with matrix enabled 96 // Verify we are running with analog channels enabled
97 if(context->analogFrames == 0 || context->analogChannels < 4) { 97 if(context->analogFrames == 0 || context->analogOutChannels < 4) {
98 rt_printf("Error: this example needs the matrix enabled with at least 4 channels\n"); 98 rt_printf("Error: this example needs least 4 analog output channels\n");
99 return false; 99 return false;
100 } 100 }
101 101
102 // Initialise audio variables 102 // Initialise audio variables
103 gAudioFramesPerMatrixFrame = context->audioFrames / context->analogFrames; 103 gAudioFramesPerMatrixFrame = context->audioFrames / context->analogFrames;