Commit 53927d44 authored by Robert Manzke's avatar Robert Manzke

factory not completed

parent 7e9dec5d
#pragma once
#include <memory>
#include "ctagSoundProcessor.h"
#include "ctagSoundProcessors.h"
#include <string>
#include "ctagSoundProcessor.hpp"
namespace CTAG{
namespace SP{
class ctagSoundProcessorFactory{
public:
static std::unique_ptr<ctagSoundProcessor> Create()
enum SoundProcessorIDs{
none,
am
};
static std::unique_ptr<ctagSoundProcessor> Create(const SoundProcessorIDs &id){
switch(id){
case none: return nullptr;
default: return nullptr;
}
}
};
}
}
\ No newline at end of file
#include <iostream>
#include <memory>
#include "ctagSoundProcessor.hpp"
#include "ctagSoundProcessorStereoAM.hpp"
#include "ctagSoundProcessorFactory.hpp"
using namespace CTAG::SP;
int main()
{
std::unique_ptr<ctagSoundProcessor> processor = ctagSoundProcessorFactory::Create(ctagSoundProcessorFactory::none);
assert(processor);
/*
std::unique_ptr<ctagSoundProcessor> res( new ctagSoundProcessorStereoAM());
std::cout << "isStereo: " << res->GetIsStereo() << std::endl;
......@@ -20,6 +23,6 @@ int main()
for(int i=0;i<32;i++){
std::cout << "Value " << data.buf0[i] << " " << data.buf1[i] << std::endl;
}
*/
return 0;
}
\ No newline at end of file
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