Sha256: 5617b2ad17027b36b301a72ecf50e5e75a78398347ac520051131326c3112392

Contents?: true

Size: 607 Bytes

Versions: 17

Compression:

Stored size: 607 Bytes

Contents

#include "beeps/filter.h"


#include "signals.h"


namespace Beeps
{


	struct Gain::Data
	{

		float gain = 1;

	};// Gain::Data


	Gain::Gain (Processor* input)
	:	Super(input)
	{
	}

	Gain::~Gain ()
	{
	}

	void
	Gain::set_gain (float gain)
	{
		self->gain = gain;

		set_updated();
	}

	float
	Gain::gain () const
	{
		return self->gain;
	}

	void
	Gain::filter (Context* context, Signals* signals, uint* offset)
	{
		Super::filter(context, signals, offset);

		Frames* frames = Signals_get_frames(signals);
		if (!frames)
			argument_error(__FILE__, __LINE__);

		*frames *= self->gain;
	}


}// Beeps

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
beeps-0.3 src/gain.cpp
beeps-0.2.1 src/gain.cpp
beeps-0.2 src/gain.cpp
beeps-0.1.46 src/gain.cpp
beeps-0.1.45 src/gain.cpp
beeps-0.1.44 src/gain.cpp
beeps-0.1.43 src/gain.cpp
beeps-0.1.42 src/gain.cpp
beeps-0.1.41 src/gain.cpp
beeps-0.1.40 src/gain.cpp
beeps-0.1.39 src/gain.cpp
beeps-0.1.38 src/gain.cpp
beeps-0.1.37 src/gain.cpp
beeps-0.1.36 src/gain.cpp
beeps-0.1.35 src/gain.cpp
beeps-0.1.34 src/gain.cpp
beeps-0.1.33 src/gain.cpp