Initial
This commit is contained in:
39
mixer/SampleDataInterface.hpp
Normal file
39
mixer/SampleDataInterface.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user