Sha256: a6b5b63d370955cbb2dc07051720e1ef7da8f9bf7a02b6581c820049a77b90f1

Contents?: true

Size: 970 Bytes

Versions: 16

Compression:

Stored size: 970 Bytes

Contents

#include "beeps/ruby/filter.h"


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


RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::TimeStretch)

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

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


static
RUCY_DEF_ALLOC(alloc, klass)
{
	return value(new Beeps::RubyProcessor<Beeps::TimeStretch>, klass);
}
RUCY_END

static
RUCY_DEF1(set_scale, scale)
{
	CHECK;

	THIS->set_scale(to<float>(scale));
	return scale;
}
RUCY_END

static
RUCY_DEF0(get_scale)
{
	CHECK;

	return value(THIS->scale());
}
RUCY_END


static Class cTimeStretch;

void
Init_beeps_time_stretch ()
{
	Module mBeeps = define_module("Beeps");

	cTimeStretch = mBeeps.define_class("TimeStretch", Beeps::processor_class());
	cTimeStretch.define_alloc_func(alloc);
	cTimeStretch.define_method("scale=", set_scale);
	cTimeStretch.define_method("scale",  get_scale);
}


namespace Beeps
{


	Class
	time_stretch_class ()
	{
		return cTimeStretch;
	}


}// Beeps

Version data entries

16 entries across 16 versions & 1 rubygems

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