Files
Work/midiseq/hold/MIDIOUT.HPP
2024-08-07 09:16:27 -04:00

58 lines
1.1 KiB
C++

#ifndef _MIDISEQ_MIDIOUTDEVICE_HPP_
#define _MIDISEQ_MIDIOUTDEVICE_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_MMSYSTEM_HPP_
#include <common/mmsystem.hpp>
#endif
#ifndef _MIDISEQ_PUREEVENT_HPP_
#include <midiseq/pureevnt.hpp>
#endif
#ifndef _MIDISEQ_MIDIOUTCAPS_HPP_
#include <midiseq/midicaps.hpp>
#endif
class MIDIOutputDevice
{
public:
MIDIOutputDevice(void);
virtual ~MIDIOutputDevice();
WORD midiEvent(const PureEvent &somePureEvent);
WORD hasDevice(void)const;
void closeDevice(void);
WORD openDevice(void);
WORD getRightVolume(void)const;
WORD getLeftVolume(void)const;
WORD setRightVolume(WORD volumeLevel);
WORD setLeftVolume(WORD volumeLevel);
private:
typedef HMIDIOUT MIDIHandle;
void hasDevice(WORD hasDevice);
WORD getDeviceCapabilities(void);
UINT mMIDIDeviceID;
WORD mHasDevice;
MIDIHandle mhMIDIOutput;
MIDIOutCaps mMIDIOutDevCaps;
};
inline
MIDIOutputDevice::~MIDIOutputDevice(void)
{
closeDevice();
}
inline
WORD MIDIOutputDevice::hasDevice(void)const
{
return mHasDevice;
}
inline
void MIDIOutputDevice::hasDevice(WORD hasDevice)
{
mHasDevice=hasDevice;
}
#endif