Merge pull request #824 in FS/freeswitch from ~PIOTRGREGOR/freeswitch:feature/FS-9011-avmd-add-configuration-file to master

* commit 'bf140e9b68a68ff1da2546012524350a5e504ae5':
  FS-9011 [avmd] Add XML config
This commit is contained in:
Mike Jerris 2016-04-28 13:11:40 -05:00
commit 94d3f62aef
5 changed files with 676 additions and 235 deletions

View File

@ -20,8 +20,6 @@
#include "avmd_fast_acosf.h"
#include "avmd_options.h"
#ifdef AVMD_FAST_MATH
typedef union {
uint32_t i;
@ -315,6 +313,3 @@ dump_table_summary(void)
}
#endif /* FAST_ACOSF_TESTING */
#endif

View File

@ -1,7 +1,9 @@
/*
* @brief Fast arithmetic using precomputed arc cosine table.
* @author Eric des Courtis
* @par Modifications: Piotr Gregor < piotrek.gregor gmail.com >
* Contributor(s):
*
* Eric des Courtis <eric.des.courtis@benbria.com>
* Piotr Gregor <piotrek.gregor gmail.com>
*/
@ -14,8 +16,6 @@
/*! \brief Arc cosine table initialization.
*
* @author Eric des Courtis
* @par Modifications: Piotr Gregor < piotrek.gregor gmail.com >
* @return 0 on success, negative value otherwise:
* -1 can't access arc cos table with error != NOENT,
* -2 table creation failed (compute_table)
@ -26,8 +26,6 @@ extern int init_fast_acosf(void);
/*! \brief Arc cosine table deinitialization.
*
* @author Eric des Courtis
* @par Modifications: Piotr Gregor < piotrek.gregor gmail.com >
* @return 0 on success, negative value otherwise:
* -1 munmap failed,
* -2 close failed
@ -36,14 +34,11 @@ extern int destroy_fast_acosf(void);
/*! \brief Return arc cos for this argument.
* @details Uses previously created and mmapped file.
* @author Eric des Courtis
*/
extern float fast_acosf(float x);
/*! \brief Arc cosine table creation.
*
* @author Eric des Courtis
* @par Modifications: Piotr Gregor < piotrek.gregor gmail.com >
* @return 0 on success, negative value otherwise:
* -1 fwrite failed,
* -2 fclose failed

View File

@ -1,8 +1,10 @@
/*
* @brief SMA buffer.
*
* @author Eric des Courtis
* @par Modifications: Piotr Gregor < piotrek.gregor gmail.com >
* Contributor(s):
*
* Eric des Courtis <eric.des.courtis@benbria.com>
* Piotr Gregor <piotrek.gregor gmail.com>
*/

View File

@ -0,0 +1,52 @@
<configuration name="avmd.conf" description="AVMD config">
<settings>
<!-- Edit these settings to change default behaviour
of each avmd session. Settings can be overwritten
by values passed dynamically per each session -->
<!-- Global settings -->
<!-- define/undefine this to enable/disable printing of avmd
intermediate computations to log -->
<param name="debug" value="0"/>
<!-- define/undef this to enable/disable reporting of beep
detection status after session ended -->
<param name="report_status" value="1"/>
<!-- define/undefine this to enable/disable faster computation
of arcus cosine - table will be created mapping floats
to integers and returning arc cos values given these integer
indices into table -->
<param name="fast_math" value="0"/>
<!-- Global settings end -->
<!-- Per call (session) settings. These settings can be overwritten
with custom/different values per each avmd session -->
<!-- define/undefine this to classify avmd beep detection as valid
only when there is required number of consecutive elements
in the SMA buffer without reset -->
<param name="require_continuous_streak" value="1"/>
<!-- define number of samples to skip starting from the beginning
of the frame and after reset -->
<param name="sample_n_to_skeep" value="6"/>
<!-- define/undefine this to enable/disable simplified estimation
of frequency based on approximation of sin(x) with (x)
in the range x=[0,PI/2] -->
<param name="simplified_estimation" value="1"/>
<!-- define/undefine to enable/disable avmd on internal channel -->
<param name="inbound_channel" value="0"/>
<!-- define/undefine to enable/disable avmd on external channel -->
<param name="outbound_channel" value="1"/>
<!-- Per call settings end -->
</settings>
</configuration>

File diff suppressed because it is too large Load Diff