From 6b5d37435277c292182be0f57e96826bccf4733c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 3 Aug 2017 23:37:38 +0200 Subject: Some more assert() debugging --- libs/ardour/audio_port.cc | 2 ++ libs/ardour/session_ltc.cc | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/ardour') diff --git a/libs/ardour/audio_port.cc b/libs/ardour/audio_port.cc index f559578e4e..70943e35a3 100644 --- a/libs/ardour/audio_port.cc +++ b/libs/ardour/audio_port.cc @@ -77,6 +77,7 @@ AudioBuffer& AudioPort::get_audio_buffer (pframes_t nframes) { /* caller must hold process lock */ + assert (_port_handle); _buffer->set_data ((Sample *) port_engine.get_buffer (_port_handle, _cycle_nframes) + _global_port_buffer_offset + _port_buffer_offset, nframes); return *_buffer; @@ -86,6 +87,7 @@ Sample* AudioPort::engine_get_whole_audio_buffer () { /* caller must hold process lock */ + assert (_port_handle); return (Sample *) port_engine.get_buffer (_port_handle, _cycle_nframes); } diff --git a/libs/ardour/session_ltc.cc b/libs/ardour/session_ltc.cc index 91e11c8a4c..8acb16dde3 100644 --- a/libs/ardour/session_ltc.cc +++ b/libs/ardour/session_ltc.cc @@ -64,6 +64,7 @@ using namespace Timecode; void Session::ltc_tx_initialize() { + assert (!ltc_encoder && !ltc_enc_buf); ltc_enc_tcformat = config.get_timecode_format(); ltc_tx_parse_offset(); @@ -93,11 +94,11 @@ void Session::ltc_tx_cleanup() { DEBUG_TRACE (DEBUG::LTC, "LTC TX cleanup\n"); + ltc_tx_connections.drop_connections (); free(ltc_enc_buf); ltc_enc_buf = NULL; ltc_encoder_free(ltc_encoder); ltc_encoder = NULL; - ltc_tx_connections.drop_connections (); } void -- cgit v1.2.3