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