Commit 7e9dec5d authored by Robert Manzke's avatar Robert Manzke

implementing factory

parent c306df2a
......@@ -13,7 +13,7 @@ namespace CTAG{
};
class ctagSoundProcessor{
public:
virtual void Process(const ProcessData &) = 0; // pure virtual --> must be implemented by derived
virtual void Process(const ProcessData &) const = 0; // pure virtual --> must be implemented by derived
virtual ~ctagSoundProcessor(){};
bool GetIsStereo(){return isStereo;}
protected:
......
#pragma once
#include <memory>
#include "ctagSoundProcessor.h"
#include "ctagSoundProcessors.h"
namespace CTAG{
namespace SP{
class ctagSoundProcessorFactory{
public:
ctagSoundProcessorFactory();
~ctagSoundProcessorFactory();
static std::unique_ptr<ctagSoundProcessor> Create()
};
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ ctagSoundProcessorMonoMultiply::ctagSoundProcessorMonoMultiply()
isStereo = false;
}
void ctagSoundProcessorMonoMultiply::Process(const ProcessData &data){
void ctagSoundProcessorMonoMultiply::Process(const ProcessData &data) const {
for(uint32_t i=0;i<data.bufSize; i++){
data.buf0[i] = (float)i;
data.buf1[i] = (float)i;
......
......@@ -4,8 +4,8 @@ namespace CTAG{
namespace SP{
class ctagSoundProcessorMonoMultiply : public ctagSoundProcessor{
public:
void Process(const ProcessData &) ;
~ctagSoundProcessorMonoMultiply();
virtual void Process(const ProcessData &) const;
virtual ~ctagSoundProcessorMonoMultiply();
ctagSoundProcessorMonoMultiply();
};
}
......
......@@ -9,7 +9,7 @@ ctagSoundProcessorStereoAM::ctagSoundProcessorStereoAM()
isStereo = true;
}
void ctagSoundProcessorStereoAM::Process(const ProcessData &data){
void ctagSoundProcessorStereoAM::Process(const ProcessData &data) const{
for(uint32_t i=0;i<data.bufSize; i++){
data.buf0[i] = (float)i;
data.buf1[i] = (float)i;
......
......@@ -4,8 +4,8 @@ namespace CTAG{
namespace SP{
class ctagSoundProcessorStereoAM : public ctagSoundProcessor{
public:
void Process(const ProcessData &) ;
~ctagSoundProcessorStereoAM();
virtual void Process(const ProcessData &) const;
virtual ~ctagSoundProcessorStereoAM();
ctagSoundProcessorStereoAM();
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment