Audio Processing Framework (APF)  version 0.3.0

For class documentation see apf::MimoProcessor.

How to use the class MimoProcessor?

You can see the full example there: examples/dummy_example.cpp

First, we include the main header file ...

... then some policies (see Policies for more information).

[class definition]

class MyProcessor : public apf::MimoProcessor<MyProcessor
, apf::pointer_policy<float*>, apf::dummy_thread_policy>
{

[input typedef]

public:
using Input = MimoProcessorBase::DefaultInput;

[MyIntermediateThing]

class MyIntermediateThing : public ProcessItem<MyIntermediateThing>
{

[MyIntermediateThing process]

public:
// you can create other classes and use them in their own RtList, as
// long as they are derived from ProcessItem<YourClass> and have a
// Process class publicly derived from ProcessItem<YourClass>::Process.
// This can be facilitated with this macro call:
APF_PROCESS(MyIntermediateThing, ProcessItem<MyIntermediateThing>)
{
// do your processing here!
}

};

[output class]

class Output : public MimoProcessorBase::DefaultOutput
{

[output ctor]

public:
explicit Output(const Params& p)
: MimoProcessorBase::DefaultOutput(p)
{}

[Process]

APF_PROCESS(Output, MimoProcessorBase::DefaultOutput)
{
// this->buffer.begin() and this->buffer.end(): access to audio data
}

};

[ctor]

MyProcessor(const apf::parameter_map& p)
: MimoProcessorBase(p)
, _intermediate_list(_fifo)
{

[inside ctor]

this->add<Input>();
_intermediate_list.add(new MyIntermediateThing());
this->add<Output>();
this->activate();
}

[Process]

~MyProcessor() { this->deactivate(); }

[private members]

APF_PROCESS(MyProcessor, MimoProcessorBase)
{
// input/output lists are processed automatically before/after this:
_process_list(_intermediate_list);
}
private:
rtlist_t _intermediate_list;
};

And that's it! That's you own class based on apf::MimoProcessor!