add mod_vmd to windows build

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10629 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-12-05 20:22:21 +00:00
parent dc0c8231d9
commit 8ca1e6dc46
3 changed files with 676 additions and 7 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,152 @@
<?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>

View File

@ -82,10 +82,6 @@
* DEPRECATED */
#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 */
#define TOLERANCE (0.20)
@ -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,
switch_frame_t *frame)
{
int i;
uint32_t i;
unsigned int j;
double pts[P];
int16_t *data;
@ -390,7 +386,7 @@ static double median(double *m, int n)
if(m[i] > max) max = m[i];
}
while(1){
for(;;) {
guess = ( min + max ) / 2;
less = 0;
greater = 0;
@ -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)
{
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 */