X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fexport_format_base.cc;h=589f75ea8f8a03435eea83633506c3af1a2c021f;hb=b285559767e21aae4467270590f048c3263fd742;hp=92400b5e474f68203fe4f0c5f9b68ed23f3b3186;hpb=a473d630eb165272992e90f8d854b1d66ec0be63;p=ardour.git diff --git a/libs/ardour/export_format_base.cc b/libs/ardour/export_format_base.cc index 92400b5e47..589f75ea8f 100644 --- a/libs/ardour/export_format_base.cc +++ b/libs/ardour/export_format_base.cc @@ -70,12 +70,6 @@ ExportFormatBase::get_intersection (ExportFormatBase const & other) const return do_set_operation (other, SetIntersection); } -boost::shared_ptr -ExportFormatBase::get_difference (ExportFormatBase const & other) const -{ - return do_set_operation (other, SetDifference); -} - boost::shared_ptr ExportFormatBase::get_union (ExportFormatBase const & other) const { @@ -101,9 +95,6 @@ ExportFormatBase::do_set_operation (ExportFormatBase const & other, SetOperation case SetIntersection: std::set_intersection (start1, end1, start2, end2, insert); break; - case SetDifference: - std::set_difference (start1, end1, start2, end2, insert); - break; case SetUnion: std::set_union (start1, end1, start2, end2, insert); break; @@ -122,9 +113,6 @@ ExportFormatBase::do_set_operation (ExportFormatBase const & other, SetOperation case SetIntersection: std::set_intersection (start1, end1, start2, end2, insert); break; - case SetDifference: - std::set_difference (start1, end1, start2, end2, insert); - break; case SetUnion: std::set_union (start1, end1, start2, end2, insert); break; @@ -144,9 +132,6 @@ ExportFormatBase::do_set_operation (ExportFormatBase const & other, SetOperation case SetIntersection: std::set_intersection (start1, end1, start2, end2, insert); break; - case SetDifference: - std::set_difference (start1, end1, start2, end2, insert); - break; case SetUnion: std::set_union (start1, end1, start2, end2, insert); break; @@ -165,9 +150,6 @@ ExportFormatBase::do_set_operation (ExportFormatBase const & other, SetOperation case SetIntersection: std::set_intersection (start1, end1, start2, end2, insert); break; - case SetDifference: - std::set_difference (start1, end1, start2, end2, insert); - break; case SetUnion: std::set_union (start1, end1, start2, end2, insert); break; @@ -186,9 +168,6 @@ ExportFormatBase::do_set_operation (ExportFormatBase const & other, SetOperation case SetIntersection: std::set_intersection (start1, end1, start2, end2, insert); break; - case SetDifference: - std::set_difference (start1, end1, start2, end2, insert); - break; case SetUnion: std::set_union (start1, end1, start2, end2, insert); break; @@ -199,20 +178,20 @@ ExportFormatBase::do_set_operation (ExportFormatBase const & other, SetOperation } ExportFormatBase::SampleRate -ExportFormatBase::nearest_sample_rate (framecnt_t sample_rate) +ExportFormatBase::nearest_sample_rate (samplecnt_t sample_rate) { int diff = 0; int smallest_diff = INT_MAX; SampleRate best_match = SR_None; #define DO_SR_COMPARISON(rate) \ - diff = std::abs((rate) - sample_rate); \ + diff = std::fabs((double)((rate) - sample_rate)); \ if(diff < smallest_diff) { \ smallest_diff = diff; \ best_match = (rate); \ } - DO_SR_COMPARISON(SR_22_05); + DO_SR_COMPARISON(SR_8); DO_SR_COMPARISON(SR_22_05); DO_SR_COMPARISON(SR_44_1); DO_SR_COMPARISON(SR_48);