summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audio_port.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-05-03 23:28:57 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-05-03 23:28:57 +0000
commita8da89d745c6a7e7d4c20dfcfb16b2537d767428 (patch)
tree06fb6cc1795ef89a7ed847395c550b6215e253df /libs/ardour/ardour/audio_port.h
parent5a1ca70f07aeb999ba3f0f09dbd49f1d50505f3c (diff)
optimize some performance bottlenecks; remove jack_nframes_t that crept back into the code
git-svn-id: svn://localhost/ardour2/branches/midi@1779 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/audio_port.h')
-rw-r--r--libs/ardour/ardour/audio_port.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h
index 07dc8da442..0e85e0e01b 100644
--- a/libs/ardour/ardour/audio_port.h
+++ b/libs/ardour/ardour/audio_port.h
@@ -38,8 +38,11 @@ class AudioPort : public Port {
free (_port);
}
- void cycle_start(jack_nframes_t nframes);
- void cycle_end();
+ void cycle_start(nframes_t nframes) {
+ _buffer.set_data ((Sample*) jack_port_get_buffer (_port, nframes), nframes);
+ }
+
+ void cycle_end() {}
DataType type() const { return DataType(DataType::AUDIO); }
@@ -72,8 +75,8 @@ class AudioPort : public Port {
uint32_t short_overs () const { return _short_overs; }
uint32_t long_overs () const { return _long_overs; }
- static void set_short_over_length (jack_nframes_t);
- static void set_long_over_length (jack_nframes_t);
+ static void set_short_over_length (nframes_t);
+ static void set_long_over_length (nframes_t);
protected:
friend class AudioEngine;
@@ -85,14 +88,14 @@ class AudioPort : public Port {
AudioBuffer _buffer;
- jack_nframes_t _overlen;
+ nframes_t _overlen;
jack_default_audio_sample_t _peak;
float _peak_db;
uint32_t _short_overs;
uint32_t _long_overs;
- static jack_nframes_t _long_over_length;
- static jack_nframes_t _short_over_length;
+ static nframes_t _long_over_length;
+ static nframes_t _short_over_length;
};
} // namespace ARDOUR