Sha256: e60381ba69c4fbfa41eaf5bf1b0d29431e75f749147df37310284998ca70552d

Contents?: true

Size: 911 Bytes

Versions: 16

Compression:

Stored size: 911 Bytes

Contents

#include "beeps/ruby/filter.h"


#include "beeps/ruby/processor.h"
#include "defs.h"


RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::Gain)

#define THIS  to<Beeps::Gain*>(self)

#define CHECK RUCY_CHECK_OBJ(Beeps::Gain, self)


static
VALUE alloc(VALUE klass)
{
	return value(new Beeps::RubyProcessor<Beeps::Gain>, klass);
}

static
VALUE set_gain(VALUE self, VALUE gain)
{
	CHECK;

	THIS->set_gain(to<float>(gain));
	return gain;
}

static
VALUE get_gain(VALUE self)
{
	CHECK;

	return value(THIS->gain());
}


static Class cGain;

void
Init_beeps_gain ()
{
	Module mBeeps = rb_define_module("Beeps");

	cGain = mBeeps.define_class("Gain", Beeps::processor_class());
	rb_define_alloc_func(cGain, alloc);
	rb_define_method(cGain, "gain=", RUBY_METHOD_FUNC(set_gain), 1);
	rb_define_method(cGain, "gain", RUBY_METHOD_FUNC(get_gain), 0);
}


namespace Beeps
{


	Class
	gain_class ()
	{
		return cGain;
	}


}// Beeps

Version data entries

16 entries across 16 versions & 1 rubygems

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