diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-31 18:24:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-31 18:24:43 +0000 |
commit | 8ab17e96312f1a61c014c50687e15430d5ae786b (patch) | |
tree | eefb889cd64d48058a608f0c19185b2a56d73399 /libs/ardour/ardour/audio_port.h | |
parent | 1b0f6b1d69bcad74c6127690cebc1c14486e8c1d (diff) |
new port design, probably about 90% done (i.e it mostly works and this commit is to stop anyone else from stomping on my changes :)
git-svn-id: svn://localhost/ardour2/trunk@2579 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/audio_port.h')
-rw-r--r-- | libs/ardour/ardour/audio_port.h | 59 |
1 files changed, 7 insertions, 52 deletions
diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h index ce544aa7bc..874f842d83 100644 --- a/libs/ardour/ardour/audio_port.h +++ b/libs/ardour/ardour/audio_port.h @@ -21,69 +21,24 @@ #ifndef __ardour_audio_port_h__ #define __ardour_audio_port_h__ -#include <sigc++/signal.h> -#include <pbd/failed_constructor.h> -#include <ardour/ardour.h> -#include <ardour/port.h> -#include <ardour/audio_buffer.h> +#include <ardour/base_audio_port.h> namespace ARDOUR { -class AudioEngine; +class AudioPort : public BaseAudioPort, public PortFacade { -class AudioPort : public virtual Port { public: - virtual Buffer& get_buffer () { - return _buffer; - } - - virtual AudioBuffer& get_audio_buffer() { - return _buffer; - } - - void reset_overs () { - _short_overs = 0; - _long_overs = 0; - _overlen = 0; - } - - void reset_peak_meter () { - _peak = 0; - } - - void reset_meters () { - reset_peak_meter (); - reset_overs (); - } + ~AudioPort(); - float peak_db() const { return _peak_db; } - Sample peak() const { return _peak; } + void reset (); - uint32_t short_overs () const { return _short_overs; } - uint32_t long_overs () const { return _long_overs; } + void cycle_start (nframes_t nframes, nframes_t offset); + void cycle_end (nframes_t nframes, nframes_t offset); - static void set_short_over_length (nframes_t); - static void set_long_over_length (nframes_t); - protected: friend class AudioEngine; - AudioPort (Flags); // data buffer comes from elsewhere (e.g. JACK) - AudioPort (Flags, nframes_t); // data buffer owned by ardour - void reset (); - - /* engine isn't supposed to access below here */ - - AudioBuffer _buffer; - - nframes_t _overlen; - Sample _peak; - float _peak_db; - uint32_t _short_overs; - uint32_t _long_overs; - - static nframes_t _long_over_length; - static nframes_t _short_over_length; + AudioPort (const std::string&, Flags, bool external, nframes_t); }; } // namespace ARDOUR |