Consistent AU factory Preset IDs
[ardour.git] / libs / ardour / export_format_base.cc
index ed8bb9d5f875f934217e9cf039c566034ba228aa..589f75ea8f8a03435eea83633506c3af1a2c021f 100644 (file)
@@ -178,14 +178,14 @@ 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::fabs((rate) - sample_rate); \
+       diff = std::fabs((double)((rate) - sample_rate)); \
        if(diff < smallest_diff) { \
                smallest_diff = diff; \
                best_match = (rate); \