fix a bunch of memory leaks
[ardour.git] / libs / ardour / sndfileimportable.cc
index 75bfb9da57cd11f24cac3cf529e7a563471df9e7..ceb88eddc9f80c4ae61a87b41e9c1b092a59dad3 100644 (file)
@@ -51,7 +51,7 @@ SndFileImportableSource::read (Sample* buffer, framecnt_t nframes)
        return per_channel * sf_info.channels;
 }
 
-uint
+uint32_t
 SndFileImportableSource::channels () const
 {
        return sf_info.channels;
@@ -84,7 +84,8 @@ SndFileImportableSource::natural_position () const
 bool
 SndFileImportableSource::clamped_at_unity () const
 {
+       int const type = sf_info.format & SF_FORMAT_TYPEMASK;
        int const sub = sf_info.format & SF_FORMAT_SUBMASK;
        /* XXX: this may not be the full list of formats that are unclamped */
-       return (sub != SF_FORMAT_FLOAT && sub != SF_FORMAT_DOUBLE && sub != SF_FORMAT_OGG);
+       return (sub != SF_FORMAT_FLOAT && sub != SF_FORMAT_DOUBLE && type != SF_FORMAT_OGG);
 }