X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fsndfileimportable.h;h=10c429c5459cdb25e8f2e3b8247813c04b65cf4c;hb=424cacfbc83516d9e935bd93135e58b34dcfc002;hp=9eb67c0dea3779a91d3173d8681bbd4bfa4ae5ab;hpb=e0aaed6d65f160c328cb8b56d7c6552ee15d65e2;p=ardour.git diff --git a/libs/ardour/ardour/sndfileimportable.h b/libs/ardour/ardour/sndfileimportable.h index 9eb67c0dea..10c429c545 100644 --- a/libs/ardour/ardour/sndfileimportable.h +++ b/libs/ardour/ardour/sndfileimportable.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Paul Davis + Copyright (C) 2007 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,27 +22,35 @@ #include #include -#include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" #include "ardour/types.h" #include "ardour/importable_source.h" namespace ARDOUR { -class SndFileImportableSource : public ImportableSource { +class LIBARDOUR_API SndFileImportableSource : public ImportableSource { public: SndFileImportableSource (const std::string& path); virtual ~SndFileImportableSource(); - nframes_t read (Sample* buffer, nframes_t nframes); - uint32_t channels() const; - nframes_t length() const; - nframes_t samplerate() const; - void seek (nframes_t pos); + framecnt_t read (Sample* buffer, framecnt_t nframes); + uint32_t channels() const; + framecnt_t length() const; + framecnt_t samplerate() const; + void seek (framepos_t pos); + framepos_t natural_position() const; + bool clamped_at_unity () const; protected: SF_INFO sf_info; boost::shared_ptr in; + /* these are int64_t so as to be independent of whatever + types Ardour may use for framepos_t, framecnt_t etc. + */ + + int64_t timecode; + int64_t get_timecode_info (SNDFILE*, SF_BROADCAST_INFO*, bool&); }; }