#ifndef _MIDISEQ_MIDIOUTDEVICE_HPP_ #define _MIDISEQ_MIDIOUTDEVICE_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_MMSYSTEM_HPP_ #include #endif #ifndef _MIDISEQ_PUREEVENT_HPP_ #include #endif #ifndef _MIDISEQ_MIDIOUTCAPS_HPP_ #include #endif class MIDIOutputDevice { public: MIDIOutputDevice(const String &deviceName=String()); virtual ~MIDIOutputDevice(); bool midiEvent(const PureEvent &somePureEvent); bool hasDevice(void)const; void closeDevice(void); bool openDevice(void); bool openDevice(const String &deviceName); bool openDevice(int deviceID); WORD getRightVolume(void)const; WORD getLeftVolume(void)const; bool setRightVolume(WORD volumeLevel); bool setLeftVolume(WORD volumeLevel); static bool getDeviceNames(Block &deviceNames); static UINT getNumDevs(void); private: typedef HMIDIOUT MIDIHandle; void hasDevice(bool hasDevice); bool getDeviceCapabilities(void); UINT mMIDIDeviceID; bool mHasDevice; MIDIHandle mhMIDIOutput; MIDIOutCaps mMIDIOutDevCaps; }; inline MIDIOutputDevice::~MIDIOutputDevice(void) { closeDevice(); } inline bool MIDIOutputDevice::hasDevice(void)const { return mHasDevice; } inline void MIDIOutputDevice::hasDevice(bool hasDevice) { mHasDevice=hasDevice; } #endif