Ardour  8.12
audio_port.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2009 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007-2010 Carl Hetherington <carl@carlh.net>
4  * Copyright (C) 2007-2015 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #ifndef __ardour_audio_port_h__
23 #define __ardour_audio_port_h__
24 
26 
27 #include "ardour/port.h"
28 #include "ardour/audio_buffer.h"
29 
30 namespace ARDOUR {
31 
33 {
34 public:
36 
37  DataType type () const {
38  return DataType::AUDIO;
39  }
40 
43  void cycle_split ();
44 
45  void flush_buffers (pframes_t nframes);
46 
47  /* reset SRC, clear out any state */
48  void reinit (bool with_ratio);
49 
51  return get_audio_buffer (nframes);
52  }
53 
55  void set_buffer_size (pframes_t nframes);
56 
57 protected:
58  friend class PortManager;
59  AudioPort (std::string const &, PortFlags);
60 
61 
62  /* special access for PortManager only (hah, C++) */
64 
65 private:
69  bool _buf_valid;
70 };
71 
72 } // namespace ARDOUR
73 
74 #endif /* __ardour_audio_port_h__ */
Buffer & get_buffer(pframes_t nframes)
Definition: audio_port.h:50
DataType type() const
Definition: audio_port.h:37
ArdourZita::VMResampler _src
Definition: audio_port.h:67
void cycle_end(pframes_t)
AudioBuffer * _buffer
Definition: audio_port.h:66
AudioPort(std::string const &, PortFlags)
void cycle_start(pframes_t)
void reinit(bool with_ratio)
Sample * engine_get_whole_audio_buffer()
AudioBuffer & get_audio_buffer(pframes_t nframes)
Sample * _data
Definition: audio_port.h:68
void flush_buffers(pframes_t nframes)
void set_buffer_size(pframes_t nframes)
#define LIBARDOUR_API
uint32_t pframes_t