36 for (
auto endianness : {
48 mClasses.push_back( { format, endianness } );
54#ifdef FORMATCLASSIFIER_SIGNAL_DEBUG
57 sprintf(dfile,
"%s.sig", filename);
58 mpWriter = std::make_unique<DebugWriter>(dfile);
64#ifdef FORMATCLASSIFIER_SIGNAL_DEBUG
65 for (
unsigned int n = 0; n <
mClasses.size(); n++)
84 int format = SF_FORMAT_RAW;
89 format |= SF_FORMAT_PCM_S8;
92 format |= SF_FORMAT_PCM_16;
95 format |= SF_FORMAT_PCM_32;
98 format |= SF_FORMAT_PCM_U8;
101 format |= SF_FORMAT_FLOAT;
104 format |= SF_FORMAT_DOUBLE;
107 format |= SF_FORMAT_PCM_16;
114 format |= SF_ENDIAN_LITTLE;
132 for (
unsigned int n = 0; n <
mClasses.size(); n++)
136#ifdef FORMATCLASSIFIER_SIGNAL_DEBUG
157 for (
unsigned int n = 0; n <
mClasses.size(); n++)
161#ifdef FORMATCLASSIFIER_SIGNAL_DEBUG
186 if (monoMax > stereoMax)
270 for (
unsigned int n = 0; n < len; n++)
278 for (
unsigned int n = 0; n < len; n++)
286 for (
unsigned int n = 0; n < len; n++)
295 for (
unsigned int n = 0; n < len; n++)
312 for (
unsigned int n = 0; n < len; n++)
325 return Max(in, len, &dummyidx);
330 float max = -FLT_MAX;
333 for (
unsigned int n = 0; n < len; n++)
347 for(
unsigned int n = 0; n < len; n++)
349 out[n] = (float) in[n];
float CalcPower(float *sig, float fc, float bw)