diff options
-rw-r--r-- | libs/ardour/sndfileimportable.cc | 3 | ||||
-rw-r--r-- | libs/ardour/sndfilesource.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libs/ardour/sndfileimportable.cc b/libs/ardour/sndfileimportable.cc index 75bfb9da57..c9f6c4014f 100644 --- a/libs/ardour/sndfileimportable.cc +++ b/libs/ardour/sndfileimportable.cc @@ -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); } diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index fa2e761d8e..3c219dc191 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -877,9 +877,10 @@ SndFileSource::one_of_several_channels () const bool SndFileSource::clamped_at_unity () const { + int const type = _info.format & SF_FORMAT_TYPEMASK; int const sub = _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); + return (sub != SF_FORMAT_FLOAT && sub != SF_FORMAT_DOUBLE && type != SF_FORMAT_OGG); } void |