Mercurial > hg > opencollidoscope
comparison CollidoscopeApp/include/PGranularNode.h @ 5:75b744078d66
added license
author | Fiore Martin <f.martin@qmul.ac.uk> |
---|---|
date | Wed, 13 Jul 2016 16:06:46 +0200 |
parents | 7fb593d53361 |
children | 4dad0b810f18 |
comparison
equal
deleted
inserted
replaced
4:ab6db404403a | 5:75b744078d66 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 2016 Queen Mary University of London | |
4 Author: Fiore Martin | |
5 | |
6 This file is part of Collidoscope. | |
7 | |
8 Collidoscope is free software: you can redistribute it and/or modify | |
9 it under the terms of the GNU General Public License as published by | |
10 the Free Software Foundation, either version 3 of the License, or | |
11 (at your option) any later version. | |
12 | |
13 This program is distributed in the hope that it will be useful, | |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 GNU General Public License for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 */ | |
21 | |
1 #pragma once | 22 #pragma once |
2 | 23 |
3 #include "cinder/Cinder.h" | 24 #include "cinder/Cinder.h" |
4 #include "cinder/audio/Node.h" | 25 #include "cinder/audio/Node.h" |
5 #include "cinder/audio/dsp/RingBuffer.h" | 26 #include "cinder/audio/dsp/RingBuffer.h" |
52 | 73 |
53 ci::audio::dsp::RingBufferT<NoteMsg>& getNoteRingBuffer() { return mNoteMsgRingBufferPack.getBuffer(); } | 74 ci::audio::dsp::RingBufferT<NoteMsg>& getNoteRingBuffer() { return mNoteMsgRingBufferPack.getBuffer(); } |
54 | 75 |
55 protected: | 76 protected: |
56 | 77 |
57 void initialize() override; | 78 void initialize() override; |
58 | 79 |
59 void process( ci::audio::Buffer *buffer ) override; | 80 void process( ci::audio::Buffer *buffer ) override; |
60 | 81 |
61 private: | 82 private: |
62 | 83 |
63 // Wraps a std::atomic but get() returns a boost::optional that is set to a real value only when the atomic has changed. | 84 // Wraps a std::atomic but get() returns a boost::optional that is set to a real value only when the atomic has changed. |
64 // It is used to avoid calling PGranulat setter methods with * the same value at each audio callback. | 85 // It is used to avoid calling PGranulat setter methods with * the same value at each audio callback. |