Sha256: dd136a308a591f475e48a79e8c2e73517e461824abc5aa5ea995b0eb73420535

Contents?: true

Size: 1.44 KB

Versions: 16

Compression:

Stored size: 1.44 KB

Contents

#include "beeps/ruby/generator.h"


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


RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::FileIn)

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

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


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

static
RUCY_DEF1(set_path, path)
{
	CHECK;

	THIS->set_path(path.c_str());
	return path;
}
RUCY_END

static
RUCY_DEF0(get_path)
{
	CHECK;

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

static
RUCY_DEF0(get_sample_rate)
{
	CHECK;

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

static
RUCY_DEF0(get_nchannels)
{
	CHECK;

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

static
RUCY_DEF0(get_nsamples)
{
	CHECK;

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

static
RUCY_DEF0(get_seconds)
{
	CHECK;

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


static Class cFileIn;

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

	cFileIn = mBeeps.define_class("FileIn", Beeps::processor_class());
	cFileIn.define_alloc_func(alloc);
	cFileIn.define_method("path=",       set_path);
	cFileIn.define_method("path",        get_path);
	cFileIn.define_method("sample_rate", get_sample_rate);
	cFileIn.define_method("nchannels",   get_nchannels);
	cFileIn.define_method("nsamples",    get_nsamples);
	cFileIn.define_method("seconds",     get_seconds);
}


namespace Beeps
{


	Class
	file_in_class ()
	{
		return cFileIn;
	}


}// Beeps

Version data entries

16 entries across 16 versions & 1 rubygems

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