summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audio_port.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-01-21 02:27:21 +0000
committerCarl Hetherington <carl@carlh.net>2009-01-21 02:27:21 +0000
commitd6637dad5a239d74038fdf9e5800e5108ba0c44f (patch)
tree8371648bdc73dc98407c6924fefa00934e344902 /libs/ardour/ardour/audio_port.h
parent4476461443061703e9ef268ade72511dff3e3ae5 (diff)
Rework Port class hierarchy a bit. Hopefully now simpler, and should
support connection of JACK ports with internal ones. git-svn-id: svn://localhost/ardour2/branches/3.0@4417 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/audio_port.h')
-rw-r--r--libs/ardour/ardour/audio_port.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h
index fa416864e9..339165da0f 100644
--- a/libs/ardour/ardour/audio_port.h
+++ b/libs/ardour/ardour/audio_port.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2002 Paul Davis
+ Copyright (C) 2002-2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,28 +21,42 @@
#ifndef __ardour_audio_port_h__
#define __ardour_audio_port_h__
-#include <ardour/base_audio_port.h>
+#include <ardour/port.h>
+#include <ardour/audio_buffer.h>
namespace ARDOUR {
-class AudioPort : public BaseAudioPort, public PortFacade {
-
+class AudioPort : public Port
+{
public:
~AudioPort();
- void reset ();
+ DataType type () const {
+ return DataType::AUDIO;
+ }
+
+ void cycle_start (nframes_t, nframes_t);
+ void cycle_end (nframes_t, nframes_t);
- void cycle_start (nframes_t nframes, nframes_t offset);
- void cycle_end (nframes_t nframes, nframes_t offset);
+ Buffer& get_buffer (nframes_t nframes, nframes_t offset) {
+ return get_audio_buffer (nframes, offset);
+ }
- AudioBuffer& get_audio_buffer( nframes_t nframes, nframes_t offset );
+ AudioBuffer& get_audio_buffer (nframes_t, nframes_t);
+
+ void reset ();
protected:
friend class AudioEngine;
- AudioPort (const std::string&, Flags, bool external, nframes_t);
+ AudioPort (std::string const &, Flags, bool, nframes_t);
+
private:
+ void mixdown (nframes_t, nframes_t, bool);
+
bool _has_been_mixed_down;
+ AudioBuffer* _buffer;
+ bool _own_buffer;
};
} // namespace ARDOUR