34 if (sf_command (sf, SFC_GET_BROADCAST_INFO, binfo,
sizeof (*binfo)) != SF_TRUE) {
47 if (binfo->time_reference_high & 0x80000000) {
49 snprintf(tmp,
sizeof(tmp),
"%x%08x", binfo->time_reference_high, binfo->time_reference_low);
60 int64_t ret = (uint32_t) (binfo->time_reference_high & 0x7fffffff);
62 ret |= (uint32_t) (binfo->time_reference_low & 0xffffffff);
70 memset(&sf_info, 0 ,
sizeof(sf_info));
71 in.reset( sf_open(path.c_str(), SFM_READ, &sf_info), sf_close);
74 SF_BROADCAST_INFO binfo;
77 memset (&binfo, 0,
sizeof (binfo));
78 timecode = get_timecode_info (in.get(), &binfo, timecode_exists);
80 if (!timecode_exists) {
92 framecnt_t per_channel = nframes / sf_info.channels;
93 per_channel = sf_readf_float (in.get(), buffer, per_channel);
94 return per_channel * sf_info.channels;
100 return sf_info.channels;
112 return sf_info.samplerate;
118 sf_seek (in.get(), 0, SEEK_SET);
130 int const type = sf_info.format & SF_FORMAT_TYPEMASK;
131 int const sub = sf_info.format & SF_FORMAT_SUBMASK;
133 return (sub != SF_FORMAT_FLOAT && sub != SF_FORMAT_DOUBLE && type != SF_FORMAT_OGG);
framepos_t natural_position() const
SndFileImportableSource(const std::string &path)
uint32_t channels() const
bool clamped_at_unity() const
framecnt_t samplerate() const
LIBPBD_API Transmitter warning
std::ostream & endmsg(std::ostream &ostr)
framecnt_t read(Sample *buffer, framecnt_t nframes)
void seek(framepos_t pos)
int64_t get_timecode_info(SNDFILE *, SF_BROADCAST_INFO *, bool &)
virtual ~SndFileImportableSource()
framecnt_t length() const