From 6298246a009c32784aa1d789c5887390d113c4f5 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 25 Sep 2016 22:20:08 +0200 Subject: [PATCH] fix detecting .flac format --- libs/ardour/sndfilesource.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index d2bd7bc33b..008325dab1 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -342,7 +342,7 @@ SndFileSource::open () return -1; } - if (_info.format & SF_FORMAT_FLAC) { + if ((_info.format & SF_FORMAT_TYPEMASK ) == SF_FORMAT_FLAC) { assert (!writable()); _sndfile = sf_open_fd (fd, SFM_READ, &_info, true); } else { @@ -776,7 +776,7 @@ SndFileSource::set_header_timeline_position () framecnt_t SndFileSource::write_float (Sample* data, framepos_t frame_pos, framecnt_t cnt) { - if (_info.format & SF_FORMAT_FLAC) { + if ((_info.format & SF_FORMAT_TYPEMASK ) == SF_FORMAT_FLAC) { assert (_length == frame_pos); } else if (_sndfile == 0 || sf_seek (_sndfile, frame_pos, SEEK_SET|SFM_WRITE) < 0) {