Files
Work/sample/holdii/InCaps.hpp
2024-08-07 09:16:27 -04:00

96 lines
1.6 KiB
C++

#ifndef _SAMPLE_WAVEINCAPS_HPP_
#define _SAMPLE_WAVEINCAPS_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _COMMON_MMSYSTEM_HPP_
#include <common/mmsystem.hpp>
#endif
class WaveInCaps : private WAVEINCAPS
{
public:
WaveInCaps(const WaveInCaps &someWaveInCaps);
WaveInCaps(void);
~WaveInCaps();
WaveInCaps &operator=(const WaveInCaps &someWaveInCaps);
operator WAVEINCAPS &(void);
UINT manufacturerID(void)const;
UINT productID(void)const;
WORD driverVersion(void)const;
String productName(void)const;
DWORD supportedFormats(void)const;
UINT channels(void)const;
private:
};
inline
WaveInCaps::WaveInCaps(const WaveInCaps &someWaveInCaps)
{
*this=someWaveInCaps;
}
inline
WaveInCaps::WaveInCaps(void)
{
::memset(this,0,sizeof(*this));
}
inline
WaveInCaps::~WaveInCaps()
{
}
inline
UINT WaveInCaps::manufacturerID(void)const
{
return WAVEINCAPS::wMid;
}
inline
UINT WaveInCaps::productID(void)const
{
return WAVEINCAPS::wPid;
}
inline
WORD WaveInCaps::driverVersion(void)const
{
return WAVEINCAPS::vDriverVersion;
}
inline
String WaveInCaps::productName(void)const
{
return String(WAVEINCAPS::szPname);
}
inline
DWORD WaveInCaps::supportedFormats(void)const
{
return WAVEINCAPS::dwFormats;
}
inline
UINT WaveInCaps::channels(void)const
{
return WAVEINCAPS::wChannels;
}
inline
WaveInCaps::operator WAVEINCAPS &(void)
{
return *((WAVEINCAPS*)this);
}
inline
WaveInCaps &WaveInCaps::operator=(const WaveInCaps &someWaveInCaps)
{
::memcpy(this,&someWaveInCaps,sizeof(*this));
return *this;
}
#endif