Mercurial > hg > beaglert
comparison projects/filter_FIR/render.cpp @ 5:09f03ac40fcc
API improvements and cleanups. Now all common audio command-line options can be parsed automatically.
author | andrewm |
---|---|
date | Sat, 08 Nov 2014 16:16:55 +0100 |
parents | 021ac8a1a4f9 |
children | 06f93bef7dd2 |
comparison
equal
deleted
inserted
replaced
4:f34c63568523 | 5:09f03ac40fcc |
---|---|
34 AuxiliaryTask gTriggerSamplesTask; | 34 AuxiliaryTask gTriggerSamplesTask; |
35 | 35 |
36 bool initialise_trigger(); | 36 bool initialise_trigger(); |
37 void trigger_samples(); | 37 void trigger_samples(); |
38 | 38 |
39 extern int gPeriodSize; // Period size in sensor frames | 39 int gPeriodSize; // Period size in sensor frames |
40 | 40 |
41 | 41 |
42 // initialise_render() is called once before the audio rendering starts. | 42 // initialise_render() is called once before the audio rendering starts. |
43 // Use it to perform any initialisation and allocation which is dependent | 43 // Use it to perform any initialisation and allocation which is dependent |
44 // on the period size or sample rate. | 44 // on the period size or sample rate. |
56 // Retrieve a parameter passed in from the initAudio() call | 56 // Retrieve a parameter passed in from the initAudio() call |
57 gSampleData = *(SampleData *)userData; | 57 gSampleData = *(SampleData *)userData; |
58 | 58 |
59 gReadPtr = -1; | 59 gReadPtr = -1; |
60 gNumChannels = numChannels; | 60 gNumChannels = numChannels; |
61 gPeriodSize = numMatrixFramesPerPeriod; | |
61 | 62 |
62 initialise_filter(); | 63 initialise_filter(); |
63 | 64 |
64 // Initialise auxiliary tasks | 65 // Initialise auxiliary tasks |
65 if(!initialise_trigger()) | 66 if(!initialise_trigger()) |