#ifndef _MIDISEQ_MIDIOUTCAPS_HPP_ #define _MIDISEQ_MIDIOUTCAPS_HPP_ #ifndef _COMMON_STRING_HPP_ #include #endif #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_MMSYSTEM_HPP_ #include #endif class MIDIOutCaps : private MIDIOUTCAPS { public: enum Type{MIDIPort=MOD_MIDIPORT,SQSynth=MOD_SQSYNTH,FMSynth=MOD_FMSYNTH,Mapper=MOD_MAPPER}; enum Channel{Channel0=0x0001,Channel1=0x0002,Channel2=0x0004,Channel3=0x0008, Channel4=0x0010,Channel5=0x0020,Channel6=0x0040,Channel7=0x0080,Channel8=0x0100, Channel9=0x0200,Channel10=0x0400,Channel11=0x0800,Channel12=0x1000, Channel13=0x2000,Channel14=0x4000,Channel15=0x8000,ChannelAll=0xFFFF}; MIDIOutCaps(void); ~MIDIOutCaps(); UINT deviceID(void)const; UINT productID(void)const; WORD driverVersion(void)const; String productName(void)const; Type technology(void)const; WORD numVoices(void)const; WORD numNotes(void)const; WORD hasChannel(MIDIOutCaps::Channel channel)const; WORD hasPatchCache(void)const; WORD hasLeftRightVolume(void)const; WORD hasVolume(void)const; MIDIOUTCAPS &getMIDIOUTCAPS(void); operator MIDIOUTCAPS*(void); private: }; inline MIDIOutCaps::MIDIOutCaps(void) { ::memset(this,0,sizeof(*this)); } inline MIDIOutCaps::~MIDIOutCaps() { } inline MIDIOutCaps::operator MIDIOUTCAPS*(void) { return this; } inline MIDIOUTCAPS &MIDIOutCaps::getMIDIOUTCAPS(void) { return *this; } inline UINT MIDIOutCaps::deviceID(void)const { return wMid; } inline UINT MIDIOutCaps::productID(void)const { return wPid; } inline WORD MIDIOutCaps::driverVersion(void)const { return vDriverVersion; } inline String MIDIOutCaps::productName(void)const { return szPname; } inline MIDIOutCaps::Type MIDIOutCaps::technology(void)const { return (Type)wTechnology; } inline WORD MIDIOutCaps::numVoices(void)const { return wVoices; } inline WORD MIDIOutCaps::numNotes(void)const { return wNotes; } inline WORD MIDIOutCaps::hasChannel(MIDIOutCaps::Channel channel)const { return (channel&wChannelMask); } inline WORD MIDIOutCaps::hasVolume(void)const { return (WORD)(dwSupport&MIDICAPS_VOLUME); } inline WORD MIDIOutCaps::hasLeftRightVolume(void)const { return (WORD)(dwSupport&MIDICAPS_LRVOLUME); } inline WORD MIDIOutCaps::hasPatchCache(void)const { return (WORD)(dwSupport&MIDICAPS_CACHE); } #endif