X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_formats.cc;h=7fa30c6b51aac0760cc815701cd3d819a79cbad6;hb=a5e8a69dec467cc7d938cc3d92acb218b04486a9;hp=b7637f3c07f5f9432788eb238225d3076d20dcab;hpb=f6fdd8dcbf41f864e9f0cc32dabe81fe3533ddfe;p=ardour.git diff --git a/libs/ardour/export_formats.cc b/libs/ardour/export_formats.cc index b7637f3c07..7fa30c6b51 100644 --- a/libs/ardour/export_formats.cc +++ b/libs/ardour/export_formats.cc @@ -20,7 +20,7 @@ #include "ardour/export_formats.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; @@ -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 @@ -152,19 +156,19 @@ HasSampleFormat::get_sample_format_name (ExportFormatBase::SampleFormat format) { switch (format) { case ExportFormatBase::SF_8: - return _("8bit"); + return _("8-bit"); case ExportFormatBase::SF_16: - return _("16bit"); + return _("16-bit"); case ExportFormatBase::SF_24: - return _("24bit"); + return _("24-bit"); case ExportFormatBase::SF_32: - return _("32bit"); + return _("32-bit"); case ExportFormatBase::SF_Float: return _("float"); case ExportFormatBase::SF_Double: return _("double"); case ExportFormatBase::SF_U8: - return _("8bit unsigned"); + return _("8-bit unsigned"); case ExportFormatBase::SF_Vorbis: return _("Vorbis sample format"); case ExportFormatBase::SF_None: @@ -175,19 +179,22 @@ 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) { set_name (name); set_format_id (format_id); + add_sample_rate (SR_8); add_sample_rate (SR_22_05); add_sample_rate (SR_44_1); add_sample_rate (SR_48); add_sample_rate (SR_88_2); add_sample_rate (SR_96); + add_sample_rate (SR_176_4); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_endianness (E_FileDefault); @@ -257,7 +264,9 @@ ExportFormatOggVorbis::ExportFormatOggVorbis () add_sample_rate (SR_48); add_sample_rate (SR_88_2); add_sample_rate (SR_96); + add_sample_rate (SR_176_4); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_endianness (E_FileDefault); @@ -296,7 +305,9 @@ ExportFormatFLAC::ExportFormatFLAC () : add_sample_rate (SR_48); add_sample_rate (SR_88_2); add_sample_rate (SR_96); + add_sample_rate (SR_176_4); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_sample_format (SF_8); add_sample_format (SF_16); @@ -329,7 +340,9 @@ ExportFormatBWF::ExportFormatBWF () : add_sample_rate (SR_48); add_sample_rate (SR_88_2); add_sample_rate (SR_96); + add_sample_rate (SR_176_4); add_sample_rate (SR_192); + add_sample_rate (SR_Session); add_sample_format (SF_U8); add_sample_format (SF_16);