Minor fixes after refactoring

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