Mercurial > hg > beaglert
comparison projects/basic_passthru/render.cpp @ 269:ac8eb07afcf5
Oxygen text added to each render.cpp file for the default projects. Text includes project explanation from Wiki, edited in places.
Empty project added as a default project.
Doxyfile updated. Each of the project locations added to INPUT configuration option. Consider just watching the whole project file so all new projects are automatically pulled through.
author | Robert Jack <robert.h.jack@gmail.com> |
---|---|
date | Tue, 17 May 2016 15:40:16 +0100 |
parents | 07cfd337ad18 |
children | 5433c83ce04e |
comparison
equal
deleted
inserted
replaced
252:381f352c44eb | 269:ac8eb07afcf5 |
---|---|
1 /* | 1 /* |
2 ____ _____ _ _ | |
3 | __ )| ____| | / \ | |
4 | _ \| _| | | / _ \ | |
5 | |_) | |___| |___ / ___ \ | |
6 |____/|_____|_____/_/ \_\.io | |
7 | |
8 */ | |
9 | |
10 /* | |
2 * render.cpp | 11 * render.cpp |
3 * | 12 * |
4 * Created on: Oct 24, 2014 | 13 * Created on: Oct 24, 2014 |
5 * Author: parallels | 14 * Author: parallels |
6 */ | 15 */ |
16 | |
17 /** | |
18 \example 1_basic_audio_passthrough | |
19 | |
20 Audio passthrough: input to output | |
21 ----------------------------------------- | |
22 | |
23 This sketch demonstrates the simplest possible case of using audio: it passes | |
24 audio input straight to audio output. | |
25 | |
26 Note the nested `for` loop structure. You will see this in all Bela projects. The | |
27 first `for` loop cycles through the audio frames, the second through each of the | |
28 audio channels (in this case left 0 and right 1). | |
29 | |
30 | |
31 We write samples to the audio output buffer like this: | |
32 `context->audioOut[n * context->audioChannels + ch]` where `n` is the current audio | |
33 frame and `ch` is the current channel, both provided by the nested for loop structure. | |
34 | |
35 We can access samples in the audio input buffer in a similar way, like this: | |
36 `context->audioIn[n * context->audioChannels + ch]`. | |
37 | |
38 So a simple audio pass through is achieved by setting output buffer equal to | |
39 input buffer: | |
40 `context->audioOut[n * context->audioChannels + ch] = context->audioIn[n * context->audioChannels + ch]`. | |
41 | |
42 | |
43 */ | |
44 | |
45 | |
46 | |
7 | 47 |
8 | 48 |
9 #include <BeagleRT.h> | 49 #include <BeagleRT.h> |
10 #include <Utilities.h> | 50 #include <Utilities.h> |
11 #include <rtdk.h> | 51 #include <rtdk.h> |