Files
Work/mixer/SampleDataInterface.hpp
2024-08-07 09:16:27 -04:00

40 lines
665 B
C++

#ifndef _MIXER_SAMPLEDATAINTERFACE_HPP_
#define _MIXER_SAMPLEDATAINTERFACE_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
template <class T>
class SampleDataInterface
{
public:
SampleDataInterface();
virtual ~SampleDataInterface();
static int getBitsPerSample(void);
protected:
virtual void setAt(DWORD index,T sample)=0;
virtual T getAt(DWORD index)=0;
private:
};
template <class T>
inline
SampleDataInterface<T>::SampleDataInterface()
{
}
template <class T>
inline
SampleDataInterface<T>::~SampleDataInterface()
{
}
template <class T>
inline
int SampleDataInterface<T>::getBitsPerSample(void)
{
return sizeof(T)*8;
}
#endif