/*
- 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
#include <boost/shared_ptr.hpp>
#include <sndfile.h>
-#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);
- nframes64_t natural_position() const;
+ samplecnt_t read (Sample* buffer, samplecnt_t nframes);
+ uint32_t channels() const;
+ samplecnt_t length() const;
+ samplecnt_t samplerate() const;
+ void seek (samplepos_t pos);
+ samplepos_t natural_position() const;
+ bool clamped_at_unity () const;
protected:
SF_INFO sf_info;
boost::shared_ptr<SNDFILE> in;
- nframes_t timecode;
+
+ /* these are int64_t so as to be independent of whatever
+ types Ardour may use for samplepos_t, samplecnt_t etc.
+ */
+
+ int64_t timecode;
int64_t get_timecode_info (SNDFILE*, SF_BROADCAST_INFO*, bool&);
};