diff options
author | Robin Gareus <robin@gareus.org> | 2016-09-25 22:20:08 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-09-25 22:20:08 +0200 |
commit | 6298246a009c32784aa1d789c5887390d113c4f5 (patch) | |
tree | f98b7d06030b44aefa09279407d556b714341811 /libs/ardour/sndfilesource.cc | |
parent | f7f87342c135f5910fa8c91749f4a059b0f68f88 (diff) |
fix detecting .flac format
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 4 |
1 files 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) { |