X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudiosource.cc;h=d8dd58844f8c45f44f7348b8c7b6734e79d77317;hb=56469c195640b561119852fd6d27a4b56e5af7e2;hp=60bd5804b3c339ba5c8a52e50d9dbfeef1611d6d;hpb=dc815ea8e84d28fc01a68225c2ece4399c4a9c7e;p=ardour.git diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 60bd5804b3..d8dd58844f 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -148,8 +148,17 @@ AudioSource::update_length (sframes_t pos, sframes_t cnt) PEAK FILE STUFF ***********************************************************************/ +/** Checks to see if peaks are ready. If so, we return true. If not, we return false, and + * things are set up so that doThisWhenReady is called when the peaks are ready. + * A new PBD::ScopedConnection is created for the associated connection and written to + * *connect_here_if_not. + * + * @param doThisWhenReady Function to call when peaks are ready (if they are not already). + * @param connect_here_if_not Address to write new ScopedConnection to. + * @param event_loop Event loop for doThisWhenReady to be called in. + */ bool -AudioSource::peaks_ready (boost::function doThisWhenReady, ScopedConnection& connect_here_if_not, EventLoop* event_loop) const +AudioSource::peaks_ready (boost::function doThisWhenReady, ScopedConnection** connect_here_if_not, EventLoop* event_loop) const { bool ret; Glib::Mutex::Lock lm (_peaks_ready_lock); @@ -159,7 +168,8 @@ AudioSource::peaks_ready (boost::function doThisWhenReady, ScopedConnect */ if (!(ret = _peaks_built)) { - PeaksReady.connect (connect_here_if_not, MISSING_INVALIDATOR, doThisWhenReady, event_loop); + *connect_here_if_not = new ScopedConnection; + PeaksReady.connect (**connect_here_if_not, MISSING_INVALIDATOR, doThisWhenReady, event_loop); } return ret;