Sha256: 793bef46909c0e6e1eaa101d0481f7796170abd1e35998c685026910786c64b6
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 KB
Contents
#include "beeps/ruby/filter.h" #include "beeps/ruby/processor.h" #include "defs.h" RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
beeps-0.3 | .doc/ext/beeps/time_stretch.cpp |