diff options
author | David Robillard <d@drobilla.net> | 2011-09-23 18:11:49 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-23 18:11:49 +0000 |
commit | 9a99f038176a7fadc59bbeaa3d3d57f16e4abb74 (patch) | |
tree | f3c1dbb555ff095c1ba7a296009924390e60db09 /src/server/AudioBuffer.hpp | |
parent | 650a13f7c18a4caf4387c0845b708e2c2bf1625d (diff) | |
download | ingen-9a99f038176a7fadc59bbeaa3d3d57f16e4abb74.tar.gz ingen-9a99f038176a7fadc59bbeaa3d3d57f16e4abb74.tar.bz2 ingen-9a99f038176a7fadc59bbeaa3d3d57f16e4abb74.zip |
Animate audio port colours based on levels.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3475 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/AudioBuffer.hpp')
-rw-r--r-- | src/server/AudioBuffer.hpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/server/AudioBuffer.hpp b/src/server/AudioBuffer.hpp index 4a7869e2..5ecbcea5 100644 --- a/src/server/AudioBuffer.hpp +++ b/src/server/AudioBuffer.hpp @@ -18,12 +18,15 @@ #ifndef INGEN_ENGINE_AUDIOBUFFER_HPP #define INGEN_ENGINE_AUDIOBUFFER_HPP -#include <cstddef> #include <cassert> +#include <cmath> +#include <cstddef> + #include <boost/utility.hpp> -#include "types.hpp" -#include "ObjectBuffer.hpp" + #include "Context.hpp" +#include "ObjectBuffer.hpp" +#include "types.hpp" using namespace std; @@ -43,6 +46,8 @@ public: void copy(Context& context, const Buffer* src); void accumulate(Context& context, const AudioBuffer* src); + float peak(Context& context) const; + inline bool is_control() const { return _type.symbol() == PortType::CONTROL; } inline Sample* data() const { |