提交 8ca1e6dc authored 作者: Michael Jerris's avatar Michael Jerris

add mod_vmd to windows build

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10629 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 dc0c8231
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="mod_vmd"
ProjectGUID="{14E4A972-9CFB-436D-B0A5-4943F3F80D47}"
RootNamespace="mod_vmd"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=".\mod_vmd.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
...@@ -82,10 +82,6 @@ ...@@ -82,10 +82,6 @@
* DEPRECATED */ * DEPRECATED */
#define ADJUST_MAX (65536) #define ADJUST_MAX (65536)
/* Signed L16 to relative floating point conversion */
#define CONVERT_PT(d, i, m) do{ d = ((((double)i + (double)m) / \
(double)(2 * m)) - 0.5) * 2.0; } while(0)
/* Discreet energy separation tolerance to error */ /* Discreet energy separation tolerance to error */
#define TOLERANCE (0.20) #define TOLERANCE (0.20)
...@@ -208,7 +204,7 @@ static switch_bool_t vmd_callback(switch_media_bug_t *bug, ...@@ -208,7 +204,7 @@ static switch_bool_t vmd_callback(switch_media_bug_t *bug,
static switch_bool_t process_data(vmd_session_info_t *vmd_info, static switch_bool_t process_data(vmd_session_info_t *vmd_info,
switch_frame_t *frame) switch_frame_t *frame)
{ {
int i; uint32_t i;
unsigned int j; unsigned int j;
double pts[P]; double pts[P];
int16_t *data; int16_t *data;
...@@ -390,7 +386,7 @@ static double median(double *m, int n) ...@@ -390,7 +386,7 @@ static double median(double *m, int n)
if(m[i] > max) max = m[i]; if(m[i] > max) max = m[i];
} }
while(1){ for(;;) {
guess = ( min + max ) / 2; guess = ( min + max ) / 2;
less = 0; less = 0;
greater = 0; greater = 0;
...@@ -423,7 +419,10 @@ static double median(double *m, int n) ...@@ -423,7 +419,10 @@ static double median(double *m, int n)
static void convert_pts(int16_t *i_pts, double *d_pts, int16_t max) static void convert_pts(int16_t *i_pts, double *d_pts, int16_t max)
{ {
int i; int i;
for(i = 0; i < P; i++) CONVERT_PT(d_pts[i], i_pts[i], max); for(i = 0; i < P; i++) {
/* Signed L16 to relative floating point conversion */
d_pts[i] = ((((double)(i_pts[i]) + (double)max) / (double)(2 * max)) - 0.5) * 2.0;
}
} }
/* Amplitude estimator for DESA-2 */ /* Amplitude estimator for DESA-2 */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论