Minor fixes after refactoring

parent 2e342d24
......@@ -59,7 +59,7 @@ public:
ITA_EXCEPT1( MODAL_EXCEPTION, "Input data source not defined yet" );
const float* pfInputData = pdsInput->GetBlockPointer( 0, pStreamInfo );
process( pfInputData, getBlocklength(), m_pdsOutput->GetWritePointer( 0 ), getBlocklength(), ITAUPConvolution::OUTPUT_OVERWRITE );
Process( pfInputData, GetBlocklength(), m_pdsOutput->GetWritePointer( 0 ), GetBlocklength(), ITAUPConvolution::OUTPUT_OVERWRITE );
m_pdsOutput->IncrementWritePointer();
};
......@@ -303,19 +303,19 @@ std::string ita_convoi_commands()
void ita_convio_exchange_channel( ITAStreamConvolver* pSC, const ITASampleFrame& sfIR, const int iChannelIndex )
{
assert( sfIR.channels() > iChannelIndex );
ITAUPFilter* pFilter = pSC->requestFilter();
pFilter->load( sfIR[ iChannelIndex ].GetData(), sfIR.GetLength() );
pSC->exchangeFilter( pFilter );
pSC->releaseFilter( pFilter );
ITAUPFilter* pFilter = pSC->RequestFilter();
pFilter->Load( sfIR[ iChannelIndex ].GetData(), sfIR.GetLength() );
pSC->ExchangeFilter( pFilter );
pSC->ReleaseFilter( pFilter );
std::cout << "Exchanged filter, now streaming channel " << iChannelIndex + 1 << std::endl;
}
void ita_convio_dirac_channel( ITAStreamConvolver* pSC )
{
ITAUPFilter* pFilter = pSC->requestFilter();
ITAUPFilter* pFilter = pSC->RequestFilter();
pFilter->identity();
pSC->exchangeFilter( pFilter );
pSC->releaseFilter( pFilter );
pSC->ExchangeFilter( pFilter );
pSC->ReleaseFilter( pFilter );
std::cout << "Exchanged Dirac filter" << std::endl;
}
......@@ -53,7 +53,7 @@ ITAUPConvolution::~ITAUPConvolution()
{
// Aktuelles Filter freigeben
if( ( ITAUPFilter* ) m_pCurrentFilter )
( *m_pCurrentFilter ).m_oState.removeUse();
( *m_pCurrentFilter ).m_oState.RemoveUse();
// Nächste Filter in der Queue freigeben
FilterUpdate oUpdate;
......
......@@ -43,14 +43,14 @@ void test1() {
ITAUPConvolution* conv = new ITAUPConvolution(b, n);
ITAUPFilter* filter1 = new ITAUPFilter(b, n);
filter1->load(h, n);
filter1->Load(h, n);
conv->exchangeFilter(filter1);
conv->ExchangeFilter(filter1);
int j=0;
for (int i=0; i<uprdiv(o,b); i++) {
//for (int i=0; i<1; i++) {
conv->process(s+j, g+j);
conv->Process(s+j, g+j);
j += b;
}
......@@ -81,19 +81,19 @@ void test2() {
for (int i=0; i<(n>>1); i++) h[i] = 1;
ITAUPConvolution* conv = new ITAUPConvolution(b, n);
conv->setFilterExchangeMode(ITAUPConvolution::CROSSFADE_LINEAR);
conv->setFilterCrossfadeLength(3);
conv->SetFilterExchangeMode(ITAUPConvolution::CROSSFADE_LINEAR);
conv->SetFilterCrossfadeLength(3);
ITAUPFilter* filter1 = new ITAUPFilter(b, n);
//conv->destroyFilter(filter1);
filter1->load(h, n);
filter1->Load(h, n);
conv->exchangeFilter(filter1);
conv->ExchangeFilter(filter1);
int j=0;
for (int i=0; i<uprdiv(o,b); i++) {
//for (int i=0; i<1; i++) {
conv->process(s, g);
conv->Process(s, g);
j += b;
}
......@@ -127,24 +127,24 @@ void test3() {
h2[n-1] = 1;
ITAUPConvolution* conv = new ITAUPConvolution(b, n);
conv->setFilterExchangeMode(ITAUPConvolution::CROSSFADE_LINEAR);
conv->setFilterCrossfadeLength(3);
conv->SetFilterExchangeMode(ITAUPConvolution::CROSSFADE_LINEAR);
conv->SetFilterCrossfadeLength(3);
ITAUPFilterPool* pool = new ITAUPFilterPool(b, n, 0);
ITAUPFilter* filter1 = pool->requestFilter();
ITAUPFilter* filter2 = pool->requestFilter();
ITAUPFilter* filter1 = pool->RequestFilter();
ITAUPFilter* filter2 = pool->RequestFilter();
//conv->destroyFilter(filter1);
filter1->load(h1, n);
filter2->load(h2, n);
filter1->Load(h1, n);
filter2->Load(h2, n);
conv->exchangeFilter(filter1);
conv->ExchangeFilter(filter1);
int j=0;
for (int i=0; i<uprdiv(o,b); i++) {
//for (int i=0; i<1; i++) {
if (i == 1) conv->exchangeFilter(filter2);
if (i == 1) conv->ExchangeFilter(filter2);
// vvv f�r Bereichspr�fung auf s
conv->process(s, g);
conv->Process(s, g);
j += b;
}
......@@ -173,18 +173,18 @@ void test_filterpool() {
ITAUPConvolution* conv = new ITAUPConvolution(b, n);
ITAUPFilterPool* pool = new ITAUPFilterPool(b, n, 0);
ITAUPFilter* f1 = pool->requestFilter();
conv->exchangeFilter(f1);
conv->process(s, s);
f1->release();
ITAUPFilter* f1 = pool->RequestFilter();
conv->ExchangeFilter( f1 );
conv->Process(s, s);
f1->Release();
ITAUPFilter* f2 = pool->requestFilter();
conv->exchangeFilter(f2);
conv->process(s, s);
ITAUPFilter* f2 = pool->RequestFilter();
conv->ExchangeFilter( f2 );
conv->Process( s, s );
ITAUPFilter* f3 = pool->requestFilter();
conv->exchangeFilter(f2);
conv->process(s, s);
ITAUPFilter* f3 = pool->RequestFilter();
conv->ExchangeFilter(f2);
conv->Process( s, s );
delete conv;
delete pool;
......
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