X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_formats.cc;h=32b71f6b045b347a163e12916c5df0256626f68a;hb=f17e2847b87a4b5a5dcc19ee1cb811fafe7c6895;hp=b7637f3c07f5f9432788eb238225d3076d20dcab;hpb=f6fdd8dcbf41f864e9f0cc32dabe81fe3533ddfe;p=ardour.git diff --git a/libs/ardour/export_formats.cc b/libs/ardour/export_formats.cc index b7637f3c07..32b71f6b04 100644 --- a/libs/ardour/export_formats.cc +++ b/libs/ardour/export_formats.cc @@ -59,21 +59,25 @@ HasSampleFormat::add_sample_format (ExportFormatBase::SampleFormat format) SampleFormatPtr ptr (new SampleFormatState (format, get_sample_format_name (format))); sample_format_states.push_back (ptr); - scoped_connect (ptr->SelectChanged, boost::bind (&HasSampleFormat::update_sample_format_selection, this, _1)); - // BOOST SIGNALS how to connect one signal to another - // scoped_connect (ptr->SelectChanged, boost::bind (SampleFormatSelectChanged, _1, WeakSampleFormatPtr (ptr)); - // scoped_connect (ptr->CompatibleChanged, boost::bind (SampleFormatCompatibleChanged, _1, WeakSampleFormatPtr (ptr)); + ptr->SelectChanged.connect_same_thread (*this, boost::bind (&HasSampleFormat::update_sample_format_selection, this, _1)); + // BOOST SIGNALS Could this be made any uglier? + ptr->SelectChanged.connect_same_thread (*this, + boost::bind (boost::type (), boost::ref (SampleFormatSelectChanged), _1, WeakSampleFormatPtr (ptr))); + ptr->CompatibleChanged.connect_same_thread (*this, + boost::bind (boost::type (), boost::ref (SampleFormatCompatibleChanged), _1, WeakSampleFormatPtr (ptr))); } void -HasSampleFormat::add_dither_type (ExportFormatBase::DitherType type, Glib::ustring name) +HasSampleFormat::add_dither_type (ExportFormatBase::DitherType type, string name) { DitherTypePtr ptr (new DitherTypeState (type, name)); dither_type_states.push_back (ptr); - scoped_connect (ptr->SelectChanged, boost::bind (&HasSampleFormat::update_dither_type_selection, this, _1)); - // BOOST SIGNALS how to connect one signal to another - // scoped_connect (ptr->SelectChanged, boost::bind (DitherTypeSelectChanged, _1, WeakDitherTypePtr (ptr)); - // scoped_connect (ptr->CompatibleChanged, boost::bind (DitherTypeCompatibleChanged, _1, WeakDitherTypePtr (ptr)); + ptr->SelectChanged.connect_same_thread (*this, boost::bind (&HasSampleFormat::update_dither_type_selection, this, _1)); + // BOOST SIGNALS Could this be made any uglier? + ptr->SelectChanged.connect_same_thread (*this, + boost::bind (boost::type (), boost::ref (DitherTypeSelectChanged), _1, WeakDitherTypePtr (ptr))); + ptr->CompatibleChanged.connect_same_thread (*this, + boost::bind (boost::type (),boost::ref ( DitherTypeCompatibleChanged), _1, WeakDitherTypePtr (ptr))); } HasSampleFormat::SampleFormatPtr @@ -175,7 +179,7 @@ HasSampleFormat::get_sample_format_name (ExportFormatBase::SampleFormat format) /*** Linear ***/ -ExportFormatLinear::ExportFormatLinear (Glib::ustring name, FormatId format_id) : +ExportFormatLinear::ExportFormatLinear (string name, FormatId format_id) : HasSampleFormat (sample_formats), _default_sample_format (SF_None) { @@ -188,6 +192,7 @@ ExportFormatLinear::ExportFormatLinear (Glib::ustring name, FormatId format_id) add_sample_rate (SR_88_2); add_sample_rate (SR_96); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_endianness (E_FileDefault); @@ -258,6 +263,7 @@ ExportFormatOggVorbis::ExportFormatOggVorbis () add_sample_rate (SR_88_2); add_sample_rate (SR_96); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_endianness (E_FileDefault); @@ -297,6 +303,7 @@ ExportFormatFLAC::ExportFormatFLAC () : add_sample_rate (SR_88_2); add_sample_rate (SR_96); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_sample_format (SF_8); add_sample_format (SF_16); @@ -330,6 +337,7 @@ ExportFormatBWF::ExportFormatBWF () : add_sample_rate (SR_88_2); add_sample_rate (SR_96); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_sample_format (SF_U8); add_sample_format (SF_16);