Sha256: 79499b8762a74bc38813dee57530f5251aa8dce9a67df3c66262af2bc9615961

Contents?: true

Size: 1.52 KB

Versions: 20

Compression:

Stored size: 1.52 KB

Contents

// -*- c++ -*-
#pragma once
#ifndef __BEEPS_PROCESSOR_H__
#define __BEEPS_PROCESSOR_H__


#include <xot/ref.h>
#include <xot/pimpl.h>
#include <beeps/defs.h>


namespace Beeps
{


	class Signals;


	class Processor : public Xot::RefCountable<>
	{

		typedef Processor This;

		public:

			class Context {};

			typedef Xot::Ref<This> Ref;

			virtual ~Processor ();

			virtual void reset ();

			virtual void         set_input (Processor* input);

			virtual       Processor* input ();

			virtual const Processor* input () const;

			virtual operator bool () const;

			virtual bool operator ! () const;

			struct Data;

			Xot::PImpl<Data> self;

		protected:

			Processor (bool generator = false);

			virtual void process (Context* context, Signals* signals, uint* offset) final;

			virtual void generate (Context* context, Signals* signals, uint* offset);

			virtual void filter (Context* context, Signals* signals, uint* offset);

			virtual void set_updated ();

			friend class ProcessorContext;

	};// Processor


	class Generator : public Processor
	{

		typedef Processor Super;

		protected:

			Generator ();

		private:

			void filter (
				Context* context, Signals* signals, uint* offset) override final;

	};// Generator


	class Filter : public Processor
	{

		typedef Processor Super;

		protected:

			Filter (Processor* input = NULL);

			void set_buffering_seconds (float seconds);

		private:

			void generate (
				Context* context, Signals* signals, uint* offset) override final;

	};// Filter


}// Beeps


#endif//EOH

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
beeps-0.3.3 include/beeps/processor.h
beeps-0.3.2 include/beeps/processor.h
beeps-0.3.1 include/beeps/processor.h
beeps-0.3 include/beeps/processor.h
beeps-0.2.1 include/beeps/processor.h
beeps-0.2 include/beeps/processor.h
beeps-0.1.46 include/beeps/processor.h
beeps-0.1.45 include/beeps/processor.h
beeps-0.1.44 include/beeps/processor.h
beeps-0.1.43 include/beeps/processor.h
beeps-0.1.42 include/beeps/processor.h
beeps-0.1.41 include/beeps/processor.h
beeps-0.1.40 include/beeps/processor.h
beeps-0.1.39 include/beeps/processor.h
beeps-0.1.38 include/beeps/processor.h
beeps-0.1.37 include/beeps/processor.h
beeps-0.1.36 include/beeps/processor.h
beeps-0.1.35 include/beeps/processor.h
beeps-0.1.34 include/beeps/processor.h
beeps-0.1.33 include/beeps/processor.h