Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITADSP
Commits
91fa4f09
Commit
91fa4f09
authored
Jun 21, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
Applying ITABase API changes
parent
1452a6d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/ITAThirdOctaveFilterbank.h
View file @
91fa4f09
...
...
@@ -62,7 +62,7 @@ public:
*/
virtual
inline
void
SetIdentity
(
const
bool
bSmoothChangeover
=
true
)
{
CITAThirdOctaveMagnitudeSpectrum
oIdentity
;
CITAThirdOctave
Gain
MagnitudeSpectrum
oIdentity
;
oIdentity
.
SetIdentity
();
SetMagnitudes
(
oIdentity
,
bSmoothChangeover
);
};
...
...
@@ -72,7 +72,7 @@ public:
* \param oGains Neue Verstärkungsfaktoren
* \param bSmoothChangeover Überbenden (default, true) oder direktes Umschalten (false)
*/
virtual
void
SetMagnitudes
(
const
CITAThirdOctaveMagnitudeSpectrum
&
oGains
,
const
bool
bSmoothChangeover
=
true
)
=
0
;
virtual
void
SetMagnitudes
(
const
CITAThirdOctave
Gain
MagnitudeSpectrum
&
oGains
,
const
bool
bSmoothChangeover
=
true
)
=
0
;
//! Latenz (Verzögerung) der Filterbank zurückgeben
/**
...
...
include/ITAThirdOctaveFilterbankFIR.h
View file @
91fa4f09
...
...
@@ -70,7 +70,7 @@ public:
pFilter
->
Release
();
// Auto-release
}
inline
virtual
void
SetMagnitudes
(
const
CITAThirdOctaveMagnitudeSpectrum
&
oMags
,
const
bool
bSmoothChangeover
=
true
)
inline
virtual
void
SetMagnitudes
(
const
CITAThirdOctave
Gain
MagnitudeSpectrum
&
oMags
,
const
bool
bSmoothChangeover
=
true
)
{
m_pGenerator
->
GenerateFilter
(
oMags
,
m_pfFilter
);
ITAUPFilter
*
pFilter
=
m_pConvolver
->
RequestFilter
();
...
...
include/ITAThirdOctaveFilterbankIIR.h
View file @
91fa4f09
...
...
@@ -21,7 +21,7 @@
#include <ITADSPDefinitions.h>
#include <ITAThirdOctaveFilterbank.h>
#include <ITA
Ampl
itudeSpectrum.h>
#include <ITA
ThirdOctaveMagn
itudeSpectrum.h>
#include <ITABiquad.h>
#include <ITASampleBuffer.h>
...
...
@@ -52,7 +52,7 @@ public:
* @param[in] oMagnitudes Filter magnitudes (dB)
* @param[in] bSmoothChangeover If true, switching is smoothed
*/
void
SetMagnitudes
(
const
CITAThirdOctaveMagnitudeSpectrum
&
oMagnitudes
,
const
bool
bSmoothChangeover
=
true
);
void
SetMagnitudes
(
const
CITAThirdOctave
Gain
MagnitudeSpectrum
&
oMagnitudes
,
const
bool
bSmoothChangeover
=
true
);
//! Clear all internal accumulators
void
Clear
();
...
...
@@ -69,7 +69,7 @@ private:
class
MagnitudeUpdate
{
public:
CITAThirdOctaveMagnitudeSpectrum
oMags
;
//! New magnitudes
CITAThirdOctave
Gain
MagnitudeSpectrum
oMags
;
//! New magnitudes
int
iBlendSamples
;
//!< Anzahl Samples zum Überblenden
};
...
...
@@ -79,7 +79,7 @@ private:
int
m_nBiquadsPerBand
;
//!< Anzahl von Biqads pro Band
std
::
vector
<
CITABiquad
>
m_vBiquads
;
//!< Biquads, access: [Band][BiquadNummer]
tbb
::
strict_ppl
::
concurrent_queue
<
CITAThirdOctaveFilterbankIIR
::
MagnitudeUpdate
>
m_vMagnitudesQueue
;
//!< Liste von neuen Verstärkungsfaktoren
CITAThirdOctaveMagnitudeSpectrum
m_oMagnitudesInternal
;
//!< Interne Verstärkungsfaktoren
CITAThirdOctave
Gain
MagnitudeSpectrum
m_oMagnitudesInternal
;
//!< Interne Verstärkungsfaktoren
ITASampleBuffer
m_sfTempFilterBuf
;
//!< Intermediate buffer for filter
ITASampleBuffer
m_pfTempOutputBuf
;
//!< Intermediate buffer for output assembly
};
...
...
src/ITAThirdOctaveFilterbankIIR.cpp
View file @
91fa4f09
...
...
@@ -34,7 +34,7 @@ int CITAThirdOctaveFilterbankIIR::GetLatency() const
return
0
;
// @todo jst: really?
}
void
CITAThirdOctaveFilterbankIIR
::
SetMagnitudes
(
const
CITAThirdOctaveMagnitudeSpectrum
&
oMagnitudes
,
const
bool
bSmoothChangeover
)
void
CITAThirdOctaveFilterbankIIR
::
SetMagnitudes
(
const
CITAThirdOctave
Gain
MagnitudeSpectrum
&
oMagnitudes
,
const
bool
bSmoothChangeover
)
{
CITAThirdOctaveFilterbankIIR
::
MagnitudeUpdate
oUpdate
;
oUpdate
.
oMags
=
oMagnitudes
;
...
...
tests/ITADSPThirdOctaveFilterGeneratorTest.cpp
View file @
91fa4f09
...
...
@@ -29,7 +29,7 @@ int main( int, char** )
void
TestThirdOctaveFilterGeneratorFIRIdentity
()
{
CITAThirdOctaveMagnitudeSpectrum
oMags
;
CITAThirdOctave
Gain
MagnitudeSpectrum
oMags
;
oMags
.
SetIdentity
();
ITASampleBuffer
oFilter
(
g_iFilterLength
);
...
...
@@ -44,7 +44,7 @@ void TestThirdOctaveFilterGeneratorFIRIdentity()
void
TestThirdOctaveFilterGeneratorFIRZero
()
{
CITAThirdOctaveMagnitudeSpectrum
oMags
;
CITAThirdOctave
Gain
MagnitudeSpectrum
oMags
;
oMags
.
SetZero
();
ITASampleBuffer
oFilter
(
g_iFilterLength
);
...
...
@@ -63,7 +63,7 @@ void TestThirdOctaveFilterGeneratorFIRSingleBands()
CITAThirdOctaveFIRFilterGenerator
oFilterGenerator
(
g_dSampleRate
,
g_iFilterLength
);
CITAThirdOctaveMagnitudeSpectrum
oMags
;
CITAThirdOctave
Gain
MagnitudeSpectrum
oMags
;
for
(
int
i
=
0
;
i
<
CITAThirdOctaveMagnitudeSpectrum
::
GetNumBands
();
i
++
)
{
oMags
.
SetZero
();
...
...
tests/ITADSPThirdOctaveFilterbankTest.cpp
View file @
91fa4f09
...
...
@@ -29,7 +29,7 @@ void TestThirdOctaveFilterbankIIR()
ITASampleBuffer
x
(
iSampleLength
);
x
[
0
]
=
1.0
f
;
CITAThirdOctaveMagnitudeSpectrum
oMags
;
CITAThirdOctave
Gain
MagnitudeSpectrum
oMags
;
oMags
.
SetIdentity
();
pIIRFilterbank
->
SetMagnitudes
(
oMags
,
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment