summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-06-19 21:47:21 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-06-19 21:47:21 +0000
commit182b23e744d79b3387a779ea25010924daffe6af (patch)
tree2a8f131b09b1a5c2d7a53666588a4327ccc3983e
parent01e006e46e6d4dd0ab25e08bd44d13dd1e195886 (diff)
cleanup confused mess related to jack_port_type_get_buffer_size()
git-svn-id: svn://localhost/ardour2/branches/3.0@9747 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/audioengine.cc24
1 files changed, 9 insertions, 15 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 64f4481c6c..791a5d62a3 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -206,34 +206,28 @@ AudioEngine::start ()
if (!_running) {
- pframes_t blocksize;
-
- if (jack_port_type_get_buffer_size) {
- blocksize = jack_port_type_get_buffer_size (_priv_jack, JACK_DEFAULT_AUDIO_TYPE);
- } else {
+ if (!jack_port_type_get_buffer_size) {
warning << _("This version of JACK is old - you should upgrade to a newer version that supports jack_port_type_get_buffer_size()") << endmsg;
- blocksize = jack_get_buffer_size (_priv_jack);
- }
+ }
if (_session) {
BootMessage (_("Connect session to engine"));
- _session->set_block_size (blocksize);
_session->set_frame_rate (jack_get_sample_rate (_priv_jack));
}
- _processed_frames = 0;
- last_monitor_check = 0;
-
- set_jack_callbacks ();
-
/* a proxy for whether jack_activate() will definitely call the buffer size
* callback. with older versions of JACK, this function symbol will be null.
* this is reliable, but not clean.
*/
if (!jack_port_type_get_buffer_size) {
- jack_bufsize_callback (blocksize);
+ jack_bufsize_callback (jack_get_buffer_size (_priv_jack));
}
+
+ _processed_frames = 0;
+ last_monitor_check = 0;
+
+ set_jack_callbacks ();
if (jack_activate (_priv_jack) == 0) {
_running = true;
@@ -243,7 +237,7 @@ AudioEngine::start ()
// error << _("cannot activate JACK client") << endmsg;
}
}
-
+
return _running ? 0 : -1;
}