Mercurial > hg > beaglert
comparison 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 |
comparison
equal
deleted
inserted
replaced
542:3016638b4da2 | 543:8f8809c77dda |
---|---|
65 midi.setParserCallback(midiMessageCallback, &gMidiPort0); | 65 midi.setParserCallback(midiMessageCallback, &gMidiPort0); |
66 if(context->analogFrames == 0) { | 66 if(context->analogFrames == 0) { |
67 rt_printf("Error: this example needs the analog I/O to be enabled\n"); | 67 rt_printf("Error: this example needs the analog I/O to be enabled\n"); |
68 return false; | 68 return false; |
69 } | 69 } |
70 | |
71 if(context->audioOutChannels <= 2 || | |
72 context->analogOutChannels <= 2){ | |
73 printf("Error: for this project, you need at least 2 analog and audio output channels.\n"); | |
74 return false; | |
75 } | |
76 | |
70 gSamplingPeriod = 1/context->audioSampleRate; | 77 gSamplingPeriod = 1/context->audioSampleRate; |
71 return true; | 78 return true; |
72 } | 79 } |
73 | 80 |
74 // render() is called regularly at the highest priority by the audio engine. | 81 // render() is called regularly at the highest priority by the audio engine. |