Sha256: 4ab899f0e8de955ada2c7b54694f7ad2412de5d67e055a1a38187fef1bd66df5
Contents?: true
Size: 1002 Bytes
Versions: 16
Compression:
Stored size: 1002 Bytes
Contents
#include "beeps/ruby/filter.h" #include "beeps/ruby/processor.h" #include "defs.h" RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::PitchShift) #define THIS to<Beeps::PitchShift*>(self) #define CHECK RUCY_CHECK_OBJ(Beeps::PitchShift, self) static VALUE alloc(VALUE klass) { return value(new Beeps::RubyProcessor<Beeps::PitchShift>, klass); } static VALUE set_shift(VALUE self, VALUE shift) { CHECK; THIS->set_shift(to<float>(shift)); return shift; } static VALUE get_shift(VALUE self) { CHECK; return value(THIS->shift()); } static Class cPitchShift; void Init_beeps_pitch_shift () { Module mBeeps = rb_define_module("Beeps"); cPitchShift = mBeeps.define_class("PitchShift", Beeps::processor_class()); rb_define_alloc_func(cPitchShift, alloc); rb_define_method(cPitchShift, "shift=", RUBY_METHOD_FUNC(set_shift), 1); rb_define_method(cPitchShift, "shift", RUBY_METHOD_FUNC(get_shift), 0); } namespace Beeps { Class pitch_shift_class () { return cPitchShift; } }// Beeps
Version data entries
16 entries across 16 versions & 1 rubygems