Sha256: db7bee7bcefb2614002609b396713c51a77d2631401478608005fd2ded1dbff0
Contents?: true
Size: 1015 Bytes
Versions: 16
Compression:
Stored size: 1015 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 VALUE alloc(VALUE klass) { return value(new Beeps::RubyProcessor<Beeps::TimeStretch>, klass); } static VALUE set_scale(VALUE self, VALUE scale) { CHECK; THIS->set_scale(to<float>(scale)); return scale; } static VALUE get_scale(VALUE self) { CHECK; return value(THIS->scale()); } static Class cTimeStretch; void Init_beeps_time_stretch () { Module mBeeps = rb_define_module("Beeps"); cTimeStretch = mBeeps.define_class("TimeStretch", Beeps::processor_class()); rb_define_alloc_func(cTimeStretch, alloc); rb_define_method(cTimeStretch, "scale=", RUBY_METHOD_FUNC(set_scale), 1); rb_define_method(cTimeStretch, "scale", RUBY_METHOD_FUNC(get_scale), 0); } namespace Beeps { Class time_stretch_class () { return cTimeStretch; } }// Beeps
Version data entries
16 entries across 16 versions & 1 rubygems