/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: sgx/src/drivers/wintel32/audio/wintel32midiindevice.cpp

*/

#include "drivers/wintel32/core/core.hpp"
#include "drivers/wintel32/xwrap/mmsystem.h"

#include "sgx/core/core.hpp"
#include "sgx/audio/midi.hpp"

#include "drivers/wintel32/audio/wintel32midiindevice.hpp"

CDeviceWintel32MidiInDevice::CDeviceWintel32MidiInDevice(HMIDIIN hMidiIn) {
	deviceHandle = hMidiIn;
	midiInStart(deviceHandle);
}

tBOOL 
CDeviceWintel32MidiInDevice::flush() {
	midiInReset(deviceHandle);
	return TRUE;
}

tBOOL 
CDeviceWintel32MidiInDevice::close() {
	midiInStop(deviceHandle);
	midiInClose(deviceHandle);
	return TRUE;
}
