2 Copyright (C) 2014 Waves Audio Ltd.
\r
4 This program is free software; you can redistribute it and/or modify
\r
5 it under the terms of the GNU General Public License as published by
\r
6 the Free Software Foundation; either version 2 of the License, or
\r
7 (at your option) any later version.
\r
9 This program is distributed in the hope that it will be useful,
\r
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 GNU General Public License for more details.
\r
14 You should have received a copy of the GNU General Public License
\r
15 along with this program; if not, write to the Free Software
\r
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
\r
20 #ifndef __libardour_waves_audioport_h__
\r
21 #define __libardour_waves_audioport_h__
\r
24 #include "waves_dataport.h"
\r
28 class WavesAudioPort : public WavesDataPort {
\r
32 MAX_BUFFER_SIZE_SAMPLES = 8192,
\r
33 MAX_BUFFER_SIZE_BYTES = sizeof (Sample) * MAX_BUFFER_SIZE_SAMPLES
\r
36 WavesAudioPort (const std::string& port_name, PortFlags flags);
\r
38 virtual ~WavesAudioPort () { };
\r
40 virtual DataType type () const { return DataType::AUDIO; };
\r
42 inline Sample* buffer () { return _buffer; }
\r
43 inline const Sample* const_buffer () const { return _buffer; }
\r
45 virtual void* get_buffer (pframes_t nframes);
\r
48 virtual void _wipe_buffer();
\r
52 Sample _buffer[MAX_BUFFER_SIZE_SAMPLES];
\r
57 #endif /* __libardour_waves_audioport_h__ */
\r