Mercurial > hg > beaglert
comparison examples/01-Basics/minimal/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 | 2ec36efb2c52 |
children |
comparison
equal
deleted
inserted
replaced
542:3016638b4da2 | 543:8f8809c77dda |
---|---|
101 These arguments are pointers to data structures. The main one that's used is | 101 These arguments are pointers to data structures. The main one that's used is |
102 `context`, which is a pointer to a data structure containing lots of information | 102 `context`, which is a pointer to a data structure containing lots of information |
103 you need. | 103 you need. |
104 | 104 |
105 Take a look at what's in the data structure [here] | 105 Take a look at what's in the data structure [here] |
106 (https://code.soundsoftware.ac.uk/projects/beaglert/embedded/structBeagleRTContext.html). | |
107 | 106 |
108 You can access any of these bits of information about current audio and sensor | 107 You can access any of these bits of information about current audio and sensor |
109 settings and pointers to data buffers that are contained in the data structure | 108 settings and pointers to data buffers that are contained in the data structure |
110 like this: `context->name_of_item`. | 109 like this: `context->name_of_item`. |
111 | 110 |
112 For example, `context->audioChannels` returns the number of audio channels. | 111 For example, `context->audioInChannels` returns the number of audio input channels. |
113 `context->audioSampleRate` returns the audio sample rate. | 112 `context->audioSampleRate` returns the audio sample rate. |
114 `context->audioIn[n]` would give you the current input sample (assuming that | 113 `context->audioIn[n]` would give you the current input sample (assuming that |
115 your input is mono - if it's not you will have to account for multiple channels). | 114 your input is mono - if it's not you will have to account for multiple channels). |
116 | 115 |
117 Note that `audioIn`, `audioOut`, `analogIn`, `analogOut` are all arrays (buffers). | 116 Note that `audioIn`, `audioOut`, `analogIn`, `analogOut` are all arrays (buffers). |