Commit d91b2cce authored by Robert Manzke's avatar Robert Manzke

more processors

parent 7502f094
......@@ -9,6 +9,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ctag)
add_executable(CTAG-Plug main.cpp)
target_link_libraries(CTAG-Plug ctag)
target_include_directories(CTAG-Plug PRIVATE ctag)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
......
......@@ -13,7 +13,7 @@ namespace CTAG{
};
class ctagSoundProcessor{
public:
virtual void Process(const ProcessData &) = 0;
virtual void Process(const ProcessData &) = 0; // pure virtual --> must be implemented by derived
virtual ~ctagSoundProcessor(){};
bool GetIsStereo(){return isStereo;}
protected:
......
#pragma once
namespace CTAG{
namespace SP{
class ctagSoundProcessorManager{
};
}
}
\ No newline at end of file
#include "ctagSoundProcessorMonoMultiply.hpp"
#include <iostream>
using namespace CTAG::SP;
ctagSoundProcessorMonoMultiply::ctagSoundProcessorMonoMultiply()
{
//std::cout << "Constructor" << std::endl;
isStereo = false;
}
void ctagSoundProcessorMonoMultiply::Process(const ProcessData &data){
for(uint32_t i=0;i<data.bufSize; i++){
data.buf0[i] = (float)i;
data.buf1[i] = (float)i;
}
}
ctagSoundProcessorMonoMultiply::~ctagSoundProcessorMonoMultiply(){
//std::cout << "Destructor" << std::endl;
}
#include "ctagSoundProcessor.hpp"
namespace CTAG{
namespace SP{
class ctagSoundProcessorMonoMultiply : public ctagSoundProcessor{
public:
void Process(const ProcessData &) ;
~ctagSoundProcessorMonoMultiply();
ctagSoundProcessorMonoMultiply();
};
}
}
\ No newline at end of file
......@@ -5,7 +5,8 @@ using namespace CTAG::SP;
ctagSoundProcessorStereoAM::ctagSoundProcessorStereoAM()
{
std::cout << "Constructor" << std::endl;
//std::cout << "Constructor" << std::endl;
isStereo = true;
}
void ctagSoundProcessorStereoAM::Process(const ProcessData &data){
......@@ -16,5 +17,5 @@ void ctagSoundProcessorStereoAM::Process(const ProcessData &data){
}
ctagSoundProcessorStereoAM::~ctagSoundProcessorStereoAM(){
std::cout << "Destructor" << std::endl;
//std::cout << "Destructor" << std::endl;
}
......@@ -9,6 +9,8 @@ int main()
{
std::unique_ptr<ctagSoundProcessor> res( new ctagSoundProcessorStereoAM());
std::cout << "isStereo: " << res->GetIsStereo() << std::endl;
ProcessData data;
float b0[32], b1[32];
data.buf0 = b0;
......
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