/*
 * Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#include <gxw/GxIREdit.h>

namespace Gxw
{

void IREdit::set_state(
	float *data, int chan, int data_len, int samplerate, int cutoff_low,
	int cutoff_high, int offset, const Gainline& gain)
{
	gx_ir_edit_set_state(
		gobj(), data, chan, data_len, samplerate, cutoff_low, cutoff_high,
		offset, gain.points(), gain.size());
}

Gainline IREdit::get_gain()
{
	gain_points* p;
	int n;
	gx_ir_edit_get_gain(gobj(), &p, &n); 
	return Gainline(p, n);
}

void IREdit::set_gain(const Gainline& g)
{
	gx_ir_edit_set_gain(gobj(), g.points(), g.size()); 
}

} // namespace Gxw
