From 22b07e0233a29d9633ffa825a79503befaf2e16e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 5 Oct 2015 16:17:49 +0200 Subject: NOOP, remove trailing tabs/whitespace. --- .../audiographer/general/interleaver.h | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'libs/audiographer/audiographer/general/interleaver.h') diff --git a/libs/audiographer/audiographer/general/interleaver.h b/libs/audiographer/audiographer/general/interleaver.h index 2bc62e5443..c1b5e92cfe 100644 --- a/libs/audiographer/audiographer/general/interleaver.h +++ b/libs/audiographer/audiographer/general/interleaver.h @@ -21,30 +21,30 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver , public Throwing<> { public: - + /// Constructs an interleaver \n RT safe Interleaver() : channels (0) , max_frames (0) , buffer (0) {} - + ~Interleaver() { reset(); } - + /// Inits the interleaver. Must be called before using. \n Not RT safe void init (unsigned int num_channels, framecnt_t max_frames_per_channel) { reset(); channels = num_channels; max_frames = max_frames_per_channel; - + buffer = new T[channels * max_frames]; - + for (unsigned int i = 0; i < channels; ++i) { inputs.push_back (InputPtr (new Input (*this, i))); } } - + /** Returns the input indexed by \a channel \n RT safe * \n The \a process function of returned Sinks are also RT Safe */ @@ -53,10 +53,10 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver if (throw_level (ThrowObject) && channel >= channels) { throw Exception (*this, "Channel out of range"); } - + return boost::static_pointer_cast > (inputs[channel]); } - + private: class Input : public Sink @@ -64,7 +64,7 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver public: Input (Interleaver & parent, unsigned int channel) : frames_written (0), parent (parent), channel (channel) {} - + void process (ProcessContext const & c) { if (parent.throw_level (ThrowProcess) && c.channels() > 1) { @@ -76,18 +76,18 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver frames_written = c.frames(); parent.write_channel (c, channel); } - + using Sink::process; - + framecnt_t frames() { return frames_written; } void reset() { frames_written = 0; } - + private: framecnt_t frames_written; Interleaver & parent; unsigned int channel; }; - + void reset () { inputs.clear(); @@ -96,7 +96,7 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver channels = 0; max_frames = 0; } - + void reset_channels () { for (unsigned int i = 0; i < channels; ++i) { @@ -104,18 +104,18 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver } } - + void write_channel (ProcessContext const & c, unsigned int channel) { if (throw_level (ThrowProcess) && c.frames() > max_frames) { reset_channels(); throw Exception (*this, "Too many frames given to an input"); } - + for (unsigned int i = 0; i < c.frames(); ++i) { buffer[channel + (channels * i)] = c.data()[i]; } - + framecnt_t const ready_frames = ready_to_output(); if (ready_frames) { ProcessContext c_out (c, buffer, ready_frames, channels); @@ -142,7 +142,7 @@ class /*LIBAUDIOGRAPHER_API*/ Interleaver typedef boost::shared_ptr InputPtr; std::vector inputs; - + unsigned int channels; framecnt_t max_frames; T * buffer; -- cgit v1.2.3