Moved "BPMDetect" routines from SoundStretch application into SoundTouch library

This commit is contained in:
oparviai 2008-12-25 12:20:01 +00:00
parent 59d58734b4
commit eb4c84fb14
12 changed files with 37 additions and 410 deletions

View File

@ -60,6 +60,9 @@
#include "STTypes.h"
#include "FIFOSampleBuffer.h"
namespace soundtouch
{
/// Minimum allowed BPM rate. Used to restrict accepted result above a reasonable limit.
#define MIN_BPM 29
@ -156,4 +159,6 @@ public:
float getBpm();
};
}
#endif // _BPMDetect_H_

View File

@ -79,10 +79,10 @@ namespace soundtouch
{
/// Soundtouch library version string
#define SOUNDTOUCH_VERSION "1.3.2"
#define SOUNDTOUCH_VERSION "1.3.9"
/// SoundTouch library version id
#define SOUNDTOUCH_VERSION_ID 010302
#define SOUNDTOUCH_VERSION_ID (10309)
//
// Available setting IDs for the 'setSetting' & 'get_setting' functions:

View File

@ -26,10 +26,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date$
// Last changed : $Date: 2008-12-13 20:43:55 +0200 (la, 13 joulu 2008) $
// File revision : $Revision: 4 $
//
// $Id$
// $Id: BPMDetect.cpp 30 2008-12-13 18:43:55Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//

View File

@ -11,10 +11,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date$
// Last changed : $Date: 2008-12-13 20:43:55 +0200 (la, 13 joulu 2008) $
// File revision : $Revision: 4 $
//
// $Id$
// $Id: PeakFinder.cpp 30 2008-12-13 18:43:55Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
@ -44,6 +44,8 @@
#include "PeakFinder.h"
using namespace soundtouch;
#define max(x, y) (((x) > (y)) ? (x) : (y))

View File

@ -9,10 +9,10 @@
///
////////////////////////////////////////////////////////////////////////////////
//
// Last changed : $Date$
// Last changed : $Date: 2008-12-13 20:43:55 +0200 (la, 13 joulu 2008) $
// File revision : $Revision: 4 $
//
// $Id$
// $Id: PeakFinder.h 30 2008-12-13 18:43:55Z oparviai $
//
////////////////////////////////////////////////////////////////////////////////
//
@ -40,6 +40,9 @@
#ifndef _PeakFinder_H_
#define _PeakFinder_H_
namespace soundtouch
{
class PeakFinder
{
protected:
@ -85,4 +88,6 @@ public:
);
};
}
#endif // _PeakFinder_H_

View File

@ -298,6 +298,16 @@
BrowseInformation="1"/>
</FileConfiguration>
</File>
<Filter
Name="bpm"
Filter="">
<File
RelativePath=".\BPMDetect.cpp">
</File>
<File
RelativePath=".\PeakFinder.cpp">
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"
@ -305,6 +315,9 @@
<File
RelativePath="AAFilter.h">
</File>
<File
RelativePath="..\..\include\BPMDetect.h">
</File>
<File
RelativePath="cpu_detect.h">
</File>

View File

@ -3,13 +3,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SoundTouch", "..\..\SoundTo
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bpm", "..\bpm\bpm.vcproj", "{DA262114-26F8-4F52-BC51-111307A6C776}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundstretch", "soundstretch.vcproj", "{5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}"
ProjectSection(ProjectDependencies) = postProject
{DA262114-26F8-4F52-BC51-111307A6C776} = {DA262114-26F8-4F52-BC51-111307A6C776}
{121A2AA5-7B1F-4871-8436-FB9C837F11D4} = {121A2AA5-7B1F-4871-8436-FB9C837F11D4}
EndProjectSection
EndProject
@ -18,15 +13,13 @@ Global
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{121A2AA5-7B1F-4871-8436-FB9C837F11D4}.Debug.ActiveCfg = Debug|Win32
{121A2AA5-7B1F-4871-8436-FB9C837F11D4}.Debug.Build.0 = Debug|Win32
{121A2AA5-7B1F-4871-8436-FB9C837F11D4}.Release.ActiveCfg = Release|Win32
{121A2AA5-7B1F-4871-8436-FB9C837F11D4}.Release.Build.0 = Release|Win32
{DA262114-26F8-4F52-BC51-111307A6C776}.Debug.ActiveCfg = Debug|Win32
{DA262114-26F8-4F52-BC51-111307A6C776}.Debug.Build.0 = Debug|Win32
{DA262114-26F8-4F52-BC51-111307A6C776}.Release.ActiveCfg = Release|Win32
{DA262114-26F8-4F52-BC51-111307A6C776}.Release.Build.0 = Release|Win32
{5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Debug.ActiveCfg = Debug|Win32
{5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Debug.Build.0 = Debug|Win32
{5AACDFFA-D491-44B8-A332-DA7ACCAAF2AF}.Release.ActiveCfg = Release|Win32

View File

@ -39,7 +39,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="SoundTouchD.lib bpmD.lib"
AdditionalDependencies="SoundTouchD.lib"
OutputFile="Debug/soundstretchD.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
@ -106,7 +106,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="SoundTouch.lib bpm.lib"
AdditionalDependencies="SoundTouch.lib"
OutputFile=".\Release/soundstretch.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"

View File

@ -1,40 +0,0 @@
## Process this file with automake to create Makefile.in
##
## $Id$
##
## Copyright (C) 2003 - David W. Durham
##
## This file is part of SoundTouch, an audio processing library for pitch/time adjustments
##
## SoundTouch is free software; you can redistribute it and/or modify it under the
## terms of the GNU General Public License as published by the Free Software
## Foundation; either version 2 of the License, or (at your option) any later
## version.
##
## SoundTouch is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
## A PARTICULAR PURPOSE. See the GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License along with
## this program; if not, write to the Free Software Foundation, Inc., 59 Temple
## Place - Suite 330, Boston, MA 02111-1307, USA
include $(top_srcdir)/config/am_include.mk
# set to something if you want other stuff to be included in the distribution tarball
EXTRA_DIST=bpm.dsp bpm.dsw
noinst_HEADERS=PeakFinder.h
lib_LTLIBRARIES=libBPM.la
libBPM_la_SOURCES=BPMDetect.cpp PeakFinder.cpp
# other compiler flags to add
AM_CXXFLAGS=-O3 -I../../../include
# other linking flags to add
#libBPM_la_LIBADD=

View File

@ -1,128 +0,0 @@
# Microsoft Developer Studio Project File - Name="bpm" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=bpm - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "bpm.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "bpm.mak" CFG="bpm - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "bpm - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "bpm - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "bpm - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /W3 /GX /Zi /O2 /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x40b /d "NDEBUG"
# ADD RSC /l 0x40b /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=copy .\Release\bpm.lib ..\..\..\lib\
# End Special Build Tool
!ELSEIF "$(CFG)" == "bpm - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0x40b /d "_DEBUG"
# ADD RSC /l 0x40b /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"Debug\bpmD.lib"
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=copy .\Debug\bpmD.lib ..\..\..\lib\
# End Special Build Tool
!ENDIF
# Begin Target
# Name "bpm - Win32 Release"
# Name "bpm - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\BPMDetect.cpp
# End Source File
# Begin Source File
SOURCE=.\PeakFinder.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\..\include\BPMDetect.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\FIFOSampleBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\FIFOSamplePipe.h
# End Source File
# Begin Source File
SOURCE=.\PeakFinder.h
# End Source File
# Begin Source File
SOURCE=..\..\..\include\STTypes.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -1,31 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
#
# $Id$
###############################################################################
Project: "bpm"=.\bpm.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -1,192 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="bpm"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Debug/bpm.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="Debug\bpmD.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy .\Debug\bpmD.lib ..\..\..\lib\"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1035"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
StringPooling="TRUE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile=".\Release/bpm.pch"
AssemblerListingLocation=".\Release/"
ObjectFile=".\Release/"
ProgramDataBaseFileName=".\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile=".\Release\bpm.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="copy .\Release\bpm.lib ..\..\..\lib\"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1035"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="BPMDetect.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="PeakFinder.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\..\..\include\BPMDetect.h">
</File>
<File
RelativePath="..\..\..\include\FIFOSampleBuffer.h">
</File>
<File
RelativePath="..\..\..\include\FIFOSamplePipe.h">
</File>
<File
RelativePath="PeakFinder.h">
</File>
<File
RelativePath="..\..\..\include\STTypes.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>