summaryrefslogtreecommitdiff
path: root/libs/audiographer/audiographer/sndfile
diff options
context:
space:
mode:
Diffstat (limited to 'libs/audiographer/audiographer/sndfile')
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile.h6
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile_base.h2
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile_reader.h10
-rw-r--r--libs/audiographer/audiographer/sndfile/sndfile_writer.h14
4 files changed, 16 insertions, 16 deletions
diff --git a/libs/audiographer/audiographer/sndfile/sndfile.h b/libs/audiographer/audiographer/sndfile/sndfile.h
index 939e5f8a2c..c48a0331ab 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile.h
@@ -14,15 +14,15 @@ template<typename T = DefaultSampleType>
class Sndfile : public SndfileWriter<T>, public SndfileReader<T>
{
public:
-
+
Sndfile (std::string const & filename, SndfileBase::Mode mode = SndfileBase::ReadWrite, int format = 0,
ChannelCount channels = 0, framecnt_t samplerate = 0)
: SndfileHandle (filename, mode, format, channels, samplerate)
{}
-
+
Sndfile (Sndfile const & other) : SndfileHandle (other) {}
using SndfileHandle::operator=;
-
+
};
} // namespace
diff --git a/libs/audiographer/audiographer/sndfile/sndfile_base.h b/libs/audiographer/audiographer/sndfile/sndfile_base.h
index 02d5a7f6ea..67a34d484e 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile_base.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile_base.h
@@ -18,7 +18,7 @@ class SndfileBase : public virtual AudioGrapher::SndfileHandle
Write = SFM_WRITE,
ReadWrite = SFM_RDWR
};
-
+
protected:
SndfileBase () {}
};
diff --git a/libs/audiographer/audiographer/sndfile/sndfile_reader.h b/libs/audiographer/audiographer/sndfile/sndfile_reader.h
index aa3c0cc899..ea27470d77 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile_reader.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile_reader.h
@@ -18,13 +18,13 @@ class SndfileReader
, public Throwing<>
{
public:
-
+
SndfileReader (std::string const & path) : SndfileHandle (path) {}
virtual ~SndfileReader () {}
SndfileReader (SndfileReader const & other) : SndfileHandle (other) {}
using SndfileHandle::operator=;
-
+
/** Read data into buffer in \a context, only the data is modified (not frame count)
* Note that the data read is output to the outputs, as well as read into the context
* \return number of frames read
@@ -36,17 +36,17 @@ class SndfileReader
("Wrong number of channels given to process(), %1% instead of %2%")
% context.channels() % channels()));
}
-
+
framecnt_t const frames_read = SndfileHandle::read (context.data(), context.frames());
ProcessContext<T> c_out = context.beginning (frames_read);
-
+
if (frames_read < context.frames()) {
c_out.set_flag (ProcessContext<T>::EndOfInput);
}
this->output (c_out);
return frames_read;
}
-
+
protected:
/// SndfileHandle has to be constructed directly by deriving classes
SndfileReader () {}
diff --git a/libs/audiographer/audiographer/sndfile/sndfile_writer.h b/libs/audiographer/audiographer/sndfile/sndfile_writer.h
index 984ec01d41..57ad968dc5 100644
--- a/libs/audiographer/audiographer/sndfile/sndfile_writer.h
+++ b/libs/audiographer/audiographer/sndfile/sndfile_writer.h
@@ -37,9 +37,9 @@ class SndfileWriter
broadcast_info->write_to_file (this);
}
}
-
+
virtual ~SndfileWriter () {}
-
+
SndfileWriter (SndfileWriter const & other)
: SndfileHandle (other)
{
@@ -50,18 +50,18 @@ class SndfileWriter
framecnt_t get_frames_written() const { return frames_written; }
void reset_frames_written_count() { frames_written = 0; }
-
+
/// Writes data to file
void process (ProcessContext<T> const & c)
{
check_flags (*this, c);
-
+
if (throw_level (ThrowStrict) && c.channels() != channels()) {
throw Exception (*this, boost::str (boost::format
("Wrong number of channels given to process(), %1% instead of %2%")
% c.channels() % channels()));
}
-
+
framecnt_t const written = write (c.data(), c.frames());
frames_written += written;
@@ -76,9 +76,9 @@ class SndfileWriter
FileWritten (path);
}
}
-
+
using Sink<T>::process;
-
+
PBD::Signal1<void, std::string> FileWritten;
protected: