/***************************************************************************
                            kde_FMOut.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_FMOut.h"
}

#include <libkmid/fmout.h>

class FMOutBridge : public FMOut
{
public:
	FMOutBridge(int d, int total) : FMOut(d, total) {}
	~FMOutBridge() {}
};

kde_FMOut * kde_new_FMOut(int d, int total){
	return (kde_FMOut *) new FMOutBridge((int)d, (int)total);
}
void kde_del_FMOut( kde_FMOut* p ){
	delete (FMOutBridge*) p;
}
void kde_FMOut_openDev( kde_FMOut* instPointer,int sqfd){
	((FMOutBridge*)instPointer)->openDev((int)sqfd);
	return;
}
void kde_FMOut_closeDev( kde_FMOut* instPointer){
	((FMOutBridge*)instPointer)->closeDev();
	return;
}
void kde_FMOut_initDev( kde_FMOut* instPointer){
	((FMOutBridge*)instPointer)->initDev();
	return;
}
void kde_FMOut_noteOn( kde_FMOut* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((FMOutBridge*)instPointer)->noteOn((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_FMOut_noteOff( kde_FMOut* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((FMOutBridge*)instPointer)->noteOff((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_FMOut_keyPressure( kde_FMOut* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((FMOutBridge*)instPointer)->keyPressure((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_FMOut_chnPatchChange( kde_FMOut* instPointer,unsigned char chn, unsigned char patch){
	((FMOutBridge*)instPointer)->chnPatchChange((uchar)chn, (uchar)patch);
	return;
}
void kde_FMOut_chnPressure( kde_FMOut* instPointer,unsigned char chn, unsigned char vel){
	((FMOutBridge*)instPointer)->chnPressure((uchar)chn, (uchar)vel);
	return;
}
void kde_FMOut_chnPitchBender( kde_FMOut* instPointer,unsigned char chn, unsigned char lsb, unsigned char msb){
	((FMOutBridge*)instPointer)->chnPitchBender((uchar)chn, (uchar)lsb, (uchar)msb);
	return;
}
void kde_FMOut_chnController( kde_FMOut* instPointer,unsigned char chn, unsigned char ctl, unsigned char v){
	((FMOutBridge*)instPointer)->chnController((uchar)chn, (uchar)ctl, (uchar)v);
	return;
}
void kde_FMOut_sysex( kde_FMOut* instPointer,unsigned char* data, unsigned long size){
	((FMOutBridge*)instPointer)->sysex((uchar*)data, (ulong)size);
	return;
}
void kde_FMOut_setVolumePercentage( kde_FMOut* instPointer,int i){
	((FMOutBridge*)instPointer)->setVolumePercentage((int)i);
	return;
}
int kde_FMOut_patch( kde_FMOut* instPointer,int p){
	return (int) ((FMOutBridge*)instPointer)->patch((int)p);
}
void kde_FMOut_setFMPatchesDirectory( char* dir){
	FMOutBridge::setFMPatchesDirectory((char*)dir);
	return;
}
