/***************************************************************************
                            kde_MidiOut.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_MidiOut.h"
}

#include <libkmid/midiout.h>

class MidiOutBridge : public MidiOut
{
public:
	MidiOutBridge(int d) : MidiOut(d) {}
	~MidiOutBridge() {}
	void protected_seqbuf_dump() {
		MidiOut::seqbuf_dump();
		return;
	}
	void protected_seqbuf_clean() {
		MidiOut::seqbuf_clean();
		return;
	}
};

kde_MidiOut * kde_new_MidiOut(int d){
	return (kde_MidiOut *) new MidiOutBridge((int)d);
}
void kde_del_MidiOut( kde_MidiOut* p ){
	delete (MidiOutBridge*) p;
}
void kde_MidiOut_openDev( kde_MidiOut* instPointer,int sqfd){
	((MidiOutBridge*)instPointer)->openDev((int)sqfd);
	return;
}
void kde_MidiOut_closeDev( kde_MidiOut* instPointer){
	((MidiOutBridge*)instPointer)->closeDev();
	return;
}
void kde_MidiOut_initDev( kde_MidiOut* instPointer){
	((MidiOutBridge*)instPointer)->initDev();
	return;
}
int kde_MidiOut_deviceType( kde_MidiOut* instPointer){
	return (int) ((MidiOutBridge*)instPointer)->deviceType();
}
char* kde_MidiOut_deviceName( kde_MidiOut* instPointer){
	return (char*) ((MidiOutBridge*)instPointer)->deviceName();
}
void kde_MidiOut_setMidiMapper( kde_MidiOut* instPointer,kde_MidiMapper* map){
	((MidiOutBridge*)instPointer)->setMidiMapper((MidiMapper*)map);
	return;
}
void kde_MidiOut_noteOn( kde_MidiOut* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((MidiOutBridge*)instPointer)->noteOn((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_MidiOut_noteOff( kde_MidiOut* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((MidiOutBridge*)instPointer)->noteOff((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_MidiOut_keyPressure( kde_MidiOut* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((MidiOutBridge*)instPointer)->keyPressure((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_MidiOut_chnPatchChange( kde_MidiOut* instPointer,unsigned char chn, unsigned char patch){
	((MidiOutBridge*)instPointer)->chnPatchChange((uchar)chn, (uchar)patch);
	return;
}
void kde_MidiOut_chnPressure( kde_MidiOut* instPointer,unsigned char chn, unsigned char vel){
	((MidiOutBridge*)instPointer)->chnPressure((uchar)chn, (uchar)vel);
	return;
}
void kde_MidiOut_chnPitchBender( kde_MidiOut* instPointer,unsigned char chn, unsigned char lsb, unsigned char msb){
	((MidiOutBridge*)instPointer)->chnPitchBender((uchar)chn, (uchar)lsb, (uchar)msb);
	return;
}
void kde_MidiOut_chnController( kde_MidiOut* instPointer,unsigned char chn, unsigned char ctl, unsigned char v){
	((MidiOutBridge*)instPointer)->chnController((uchar)chn, (uchar)ctl, (uchar)v);
	return;
}
void kde_MidiOut_sysex( kde_MidiOut* instPointer,unsigned char* data, unsigned long size){
	((MidiOutBridge*)instPointer)->sysex((uchar*)data, (ulong)size);
	return;
}
void kde_MidiOut_allNotesOff( kde_MidiOut* instPointer){
	((MidiOutBridge*)instPointer)->allNotesOff();
	return;
}
void kde_MidiOut_channelSilence( kde_MidiOut* instPointer,unsigned char chn){
	((MidiOutBridge*)instPointer)->channelSilence((uchar)chn);
	return;
}
void kde_MidiOut_channelMute( kde_MidiOut* instPointer,unsigned char chn, int a){
	((MidiOutBridge*)instPointer)->channelMute((uchar)chn, (int)a);
	return;
}
void kde_MidiOut_setVolumePercentage( kde_MidiOut* instPointer,int volper){
	((MidiOutBridge*)instPointer)->setVolumePercentage((int)volper);
	return;
}
int kde_MidiOut_ok( kde_MidiOut* instPointer){
	return (int) ((MidiOutBridge*)instPointer)->ok();
}
char* kde_MidiOut_midiMapFilename( kde_MidiOut* instPointer){
	return (char*) ((MidiOutBridge*)instPointer)->midiMapFilename();
}
void kde_MidiOut_sync( kde_MidiOut* instPointer,int i){
	((MidiOutBridge*)instPointer)->sync((int)i);
	return;
}
void kde_MidiOut_seqbuf_dump( kde_MidiOut* instPointer){
	((MidiOutBridge*)instPointer)->protected_seqbuf_dump();
	return;
}
void kde_MidiOut_seqbuf_clean( kde_MidiOut* instPointer){
	((MidiOutBridge*)instPointer)->protected_seqbuf_clean();
	return;
}
