Mercurial > hg > beaglert
comparison projects/basic/render.cpp @ 285:5433c83ce04e Doxy prerelease
Doxygen content added to more project render.cpp files and amended in others.
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Tue, 17 May 2016 18:46:55 +0100 |
parents | ac8eb07afcf5 |
children |
comparison
equal
deleted
inserted
replaced
284:7bfb25a2e158 | 285:5433c83ce04e |
---|---|
25 | 25 |
26 The frequency of the sine tone is determined by a global variable, `gFrequency` | 26 The frequency of the sine tone is determined by a global variable, `gFrequency` |
27 (line 12). The sine tone is produced by incrementing the phase of a sin function | 27 (line 12). The sine tone is produced by incrementing the phase of a sin function |
28 on every audio frame. | 28 on every audio frame. |
29 | 29 |
30 The important thing to notice is the nested `for` loop structure. You will see | 30 In render() you'll see a nested for loop structure. You'll see this in all Bela projects. |
31 this in all Bela projects and in most digital audio applications. The first `for` | 31 The first for loop cycles through 'audioFrames', the second through 'audioChannels' (in this case left 0 and right 1). |
32 loop cycles through the audio frames, the second through each of the audio | 32 It is good to familiarise yourself with this structure as it is fundamental to producing sound with the system. |
33 channels (in this case left 0 and right 1). It is good to familiarise yourself | |
34 with this structure as it is fundamental to producing sound with the system. | |
35 */ | 33 */ |
36 | 34 |
37 | 35 |
38 #include <BeagleRT.h> | 36 #include <BeagleRT.h> |
39 #include <cmath> | 37 #include <cmath> |