Remove all use of nframes_t.
[ardour.git] / libs / ardour / ardour / sndfileimportable.h
index 5cd84f4f5f541eb4b53525113c2a7d8cd3e78c64..2b5535e29f134a84b97218476014e903db0ce33c 100644 (file)
@@ -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,9 +22,9 @@
 
 #include <boost/shared_ptr.hpp>
 #include <sndfile.h>
-#include <pbd/failed_constructor.h>
-#include <ardour/types.h>
-#include <ardour/importable_source.h>
+#include "pbd/failed_constructor.h"
+#include "ardour/types.h"
+#include "ardour/importable_source.h"
 
 namespace ARDOUR {
 
@@ -33,16 +33,24 @@ class SndFileImportableSource : public ImportableSource {
        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 (framecnt_t pos);
+       framepos_t natural_position() const;
+       bool       clamped_at_unity () const;
 
    protected:
        SF_INFO sf_info;
        boost::shared_ptr<SNDFILE> 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&);
 };
 
 }