Skip to content

Commit

Permalink
Merge branch 'feature/simplefdn' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed Nov 17, 2023
2 parents 3972282 + 3877c52 commit ad81355
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 261 deletions.
8 changes: 7 additions & 1 deletion libtascar/include/audiochunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ namespace TASCAR {
float gain = 1.0);
float ms() const;
float rms() const;
float maxabs() const;
inline float maxabs() const
{
float rv = 0.0f;
for(uint32_t k = 0; k < n; ++k)
rv = std::max(rv, fabsf(d[k]));
return rv;
};
float spldb() const;
float maxabsdb() const;
void append(const wave_t& src);
Expand Down
8 changes: 0 additions & 8 deletions libtascar/src/audiochunks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,6 @@ float wave_t::ms() const
return rv;
}

float wave_t::maxabs() const
{
float rv(0.0f);
for(uint32_t k = 0; k < size(); ++k)
rv = std::max(rv, fabsf(d[k]));
return rv;
}

float wave_t::spldb() const
{
return 10.0f * log10f(ms()) - SPLREFf;
Expand Down
Loading

0 comments on commit ad81355

Please sign in to comment.