Mercurial > hg > beaglert
diff examples/05-Communication/basic-midi/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 | 8fcfbfb32aa0 |
children |
line wrap: on
line diff
--- a/examples/05-Communication/basic-midi/render.cpp Fri Jun 24 13:00:31 2016 +0100 +++ b/examples/05-Communication/basic-midi/render.cpp Fri Jun 24 13:19:52 2016 +0100 @@ -67,6 +67,13 @@ rt_printf("Error: this example needs the analog I/O to be enabled\n"); return false; } + + if(context->audioOutChannels <= 2 || + context->analogOutChannels <= 2){ + printf("Error: for this project, you need at least 2 analog and audio output channels.\n"); + return false; + } + gSamplingPeriod = 1/context->audioSampleRate; return true; }