X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fcaimportable.h;h=441008f521282a6903c6961da1c81f71bdbac5e3;hb=f485cfa324717f57b9f820f43f1b53307b96a8b9;hp=dc7f5769ae2c93f28c220a4362b06088182a3495;hpb=449aab3c465bbbf66d221fac3d7ea559f1720357;p=ardour.git diff --git a/libs/ardour/ardour/caimportable.h b/libs/ardour/ardour/caimportable.h index dc7f5769ae..441008f521 100644 --- a/libs/ardour/ardour/caimportable.h +++ b/libs/ardour/ardour/caimportable.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 @@ -20,27 +20,38 @@ #ifndef __ardour_ca_importable_source_h__ #define __ardour_ca_importable_source_h__ -#include -#include -#include +#include "pbd/failed_constructor.h" +#include "ardour/libardour_visibility.h" +#include "ardour/types.h" +#include "ardour/importable_source.h" -#include +#ifdef COREAUDIO105 +#include "CAAudioFile.h" +#else +#include "CAExtAudioFile.h" +#endif namespace ARDOUR { -class CAImportableSource : public ImportableSource { +class LIBARDOUR_API CAImportableSource : public ImportableSource { public: CAImportableSource (const std::string& path); virtual ~CAImportableSource(); - nframes_t read (Sample* buffer, nframes_t nframes); + framecnt_t read (Sample* buffer, framecnt_t nframes); uint32_t channels() const; - nframes_t length() const; - nframes_t samplerate() const; - void seek (nframes_t pos); + framecnt_t length() const; + framecnt_t samplerate() const; + void seek (framepos_t pos); + framepos_t natural_position() const { return 0; } + bool clamped_at_unity () const { return false; } protected: +#ifdef COREAUDIO105 mutable CAAudioFile af; +#else + mutable CAExtAudioFile af; +#endif }; }