-void
-Session::add_diskstream (boost::shared_ptr<Diskstream> dstream)
-{
- /* need to do this in case we're rolling at the time, to prevent false underruns */
- dstream->do_refill_with_alloc ();
-
- dstream->set_block_size (current_block_size);
-
- {
- RCUWriter<DiskstreamList> writer (diskstreams);
- boost::shared_ptr<DiskstreamList> ds = writer.get_copy();
- ds->push_back (dstream);
- /* writer goes out of scope, copies ds back to main */
- }
-
- dstream->PlaylistChanged.connect_same_thread (*this, boost::bind (&Session::diskstream_playlist_changed, this, boost::weak_ptr<Diskstream> (dstream)));
- /* this will connect to future changes, and check the current length */
- diskstream_playlist_changed (boost::weak_ptr<Diskstream> (dstream));
-
- dstream->RecordEnableChanged.connect_same_thread (*this, boost::bind (&Session::update_have_rec_enabled_diskstream, this));
-}
-