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
This commit is contained in:
parent
01e006e46e
commit
182b23e744
@ -206,35 +206,29 @@ AudioEngine::start ()
|
|||||||
|
|
||||||
if (!_running) {
|
if (!_running) {
|
||||||
|
|
||||||
pframes_t blocksize;
|
if (!jack_port_type_get_buffer_size) {
|
||||||
|
|
||||||
if (jack_port_type_get_buffer_size) {
|
|
||||||
blocksize = jack_port_type_get_buffer_size (_priv_jack, JACK_DEFAULT_AUDIO_TYPE);
|
|
||||||
} else {
|
|
||||||
warning << _("This version of JACK is old - you should upgrade to a newer version that supports jack_port_type_get_buffer_size()") << endmsg;
|
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) {
|
if (_session) {
|
||||||
BootMessage (_("Connect session to engine"));
|
BootMessage (_("Connect session to engine"));
|
||||||
_session->set_block_size (blocksize);
|
|
||||||
_session->set_frame_rate (jack_get_sample_rate (_priv_jack));
|
_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
|
/* a proxy for whether jack_activate() will definitely call the buffer size
|
||||||
* callback. with older versions of JACK, this function symbol will be null.
|
* callback. with older versions of JACK, this function symbol will be null.
|
||||||
* this is reliable, but not clean.
|
* this is reliable, but not clean.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!jack_port_type_get_buffer_size) {
|
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) {
|
if (jack_activate (_priv_jack) == 0) {
|
||||||
_running = true;
|
_running = true;
|
||||||
_has_run = true;
|
_has_run = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user