Optimize automation-event process splitting
[ardour.git] / libs / ardour / ardour / caimportable.h
index 211329b8c649921615c64759f8b417118f6b5f71..23fc1782ed67cdf6c84dbe11ffa97b18e9eba708 100644 (file)
 #include "ardour/types.h"
 #include "ardour/importable_source.h"
 
-#include <appleutility/CAAudioFile.h>
+#ifdef COREAUDIO105
+#include "CAAudioFile.h"
+#else
+#include "CAExtAudioFile.h"
+#endif
 
 namespace ARDOUR {
 
@@ -34,16 +38,20 @@ class LIBARDOUR_API CAImportableSource : public ImportableSource {
        CAImportableSource (const std::string& path);
        virtual ~CAImportableSource();
 
-       framecnt_t read (Sample* buffer, framecnt_t nframes);
+       samplecnt_t read (Sample* buffer, samplecnt_t nframes);
        uint32_t  channels() const;
-       framecnt_t length() const;
-       framecnt_t samplerate() const;
-       void      seek (framepos_t pos);
-       framepos_t natural_position() const { return 0; }
+       samplecnt_t length() const;
+       samplecnt_t samplerate() const;
+       void      seek (samplepos_t pos);
+       samplepos_t natural_position() const { return 0; }
        bool clamped_at_unity () const { return false; }
 
    protected:
+#ifdef COREAUDIO105
        mutable CAAudioFile af;
+#else
+       mutable CAExtAudioFile af;
+#endif
 };
 
 }