文件名称:soundtouch
-
所属分类:
- 标签属性:
- 上传时间:2020-03-12
-
文件大小:167.35kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
SoundTouch音频处理库的使用异常简单,经过简单的编译之后,设置编译环境,以vc为例
,直接在include包含SoundTouch目录下的include路径,接着在lib添加SoundTouch目录下
的lib路径,然后在代码的头文件中添加头文件以及引用的库。如下:根据_DEBUG这个宏,
我们可以进行一些编译预处理,假如是以DEBUG编译就采用debug库,其他的话就采用
release库。他们的区别就是文件名后面是否多了一个“D”。
里接收处理过的音频数据呢?这个时候我们就要用SoundTouch提供的receiveSamples函数
调用方法。
uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output
samples.
uint maxSamples ///< How many samples to receive at max.
);他也是两个参数,第一个为接收数据的参数,第二个最大可以接收多少sample。
通过这段注释,大概明白receiveSamples这个函数不会在putSamples之后马上返回数据,
另外一方面有可能返回比maxSamples更多的数据,因此需要放在一个do…while(…)的循环里
面把他们都榨干。
// Read ready samples from SoundTouch processor & write them output file.
// NOTES:
// - 'receiveSamples' doesn't necessarily return any samples at all
// during some rounds!
// - On the other hand, during some round 'receiveSamples' may have more
// ready samples than would fit into 'sampleBuffer', and for this reason
// the 'receiveSamples' call is iterated for as many times as it
// outputs samples.
do
{
nSamples = m_SoundTouch.receiveSamples(sampleBuffer, buffSizeSamples);
//把sampleBuffer写入一个文件,或者填充进声卡的缓冲区,播放声音。
} while (nSamples != 0);
,直接在include包含SoundTouch目录下的include路径,接着在lib添加SoundTouch目录下
的lib路径,然后在代码的头文件中添加头文件以及引用的库。如下:根据_DEBUG这个宏,
我们可以进行一些编译预处理,假如是以DEBUG编译就采用debug库,其他的话就采用
release库。他们的区别就是文件名后面是否多了一个“D”。
里接收处理过的音频数据呢?这个时候我们就要用SoundTouch提供的receiveSamples函数
调用方法。
uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output
samples.
uint maxSamples ///< How many samples to receive at max.
);他也是两个参数,第一个为接收数据的参数,第二个最大可以接收多少sample。
通过这段注释,大概明白receiveSamples这个函数不会在putSamples之后马上返回数据,
另外一方面有可能返回比maxSamples更多的数据,因此需要放在一个do…while(…)的循环里
面把他们都榨干。
// Read ready samples from SoundTouch processor & write them output file.
// NOTES:
// - 'receiveSamples' doesn't necessarily return any samples at all
// during some rounds!
// - On the other hand, during some round 'receiveSamples' may have more
// ready samples than would fit into 'sampleBuffer', and for this reason
// the 'receiveSamples' call is iterated for as many times as it
// outputs samples.
do
{
nSamples = m_SoundTouch.receiveSamples(sampleBuffer, buffSizeSamples);
//把sampleBuffer写入一个文件,或者填充进声卡的缓冲区,播放声音。
} while (nSamples != 0);
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : soundtouch-1.9.2.tar.gz 列表 soundtouch/ soundtouch/configure.ac soundtouch/include/ soundtouch/include/FIFOSampleBuffer.h soundtouch/include/soundtouch_config.h.in soundtouch/include/STTypes.h soundtouch/include/SoundTouch.h soundtouch/include/Makefile.am soundtouch/include/FIFOSamplePipe.h soundtouch/include/BPMDetect.h soundtouch/configure-file-README.txt soundtouch/README.html soundtouch/soundtouch.pc.in soundtouch/Makefile.am soundtouch/COPYING.TXT soundtouch/soundtouch-1.4.pc.in soundtouch/bootstrap soundtouch/config/ soundtouch/config/am_include.mk soundtouch/config/README.TXT soundtouch/config/m4/ soundtouch/source/ soundtouch/source/SoundStretch/ soundtouch/source/SoundStretch/main.cpp soundtouch/source/SoundStretch/soundstretch.dsp soundtouch/source/SoundStretch/Makefile.am soundtouch/source/SoundStretch/RunParameters.cpp soundtouch/source/SoundStretch/soundstretch.vcproj soundtouch/source/SoundStretch/WavFile.h soundtouch/source/SoundStretch/WavFile.cpp soundtouch/source/SoundStretch/RunParameters.h soundtouch/source/SoundStretch/soundstretch.dsw soundtouch/source/SoundStretch/soundstretch.sln soundtouch/source/SoundTouchDLL/ soundtouch/source/SoundTouchDLL/SoundTouchDLL.pas soundtouch/source/SoundTouchDLL/resource.h soundtouch/source/SoundTouchDLL/SoundTouchDLL.h soundtouch/source/SoundTouchDLL/SoundTouchDLL.sln soundtouch/source/SoundTouchDLL/SoundTouchDLL.vcproj soundtouch/source/SoundTouchDLL/SoundTouchDLL.cpp soundtouch/source/SoundTouchDLL/SoundTouchDLL.rc soundtouch/source/Makefile.am soundtouch/source/SoundTouch/ soundtouch/source/SoundTouch/RateTransposer.h soundtouch/source/SoundTouch/PeakFinder.cpp soundtouch/source/SoundTouch/InterpolateLinear.cpp soundtouch/source/SoundTouch/FIFOSampleBuffer.cpp soundtouch/source/SoundTouch/SoundTouch.cpp soundtouch/source/SoundTouch/InterpolateShannon.h soundtouch/source/SoundTouch/TDStretch.cpp soundtouch/source/SoundTouch/InterpolateCubic.h soundtouch/source/SoundTouch/FIRFilter.cpp soundtouch/source/SoundTouch/FIRFilter.h soundtouch/source/SoundTouch/BPMDetect.cpp soundtouch/source/SoundTouch/sse_optimized.cpp soundtouch/source/SoundTouch/InterpolateCubic.cpp soundtouch/source/SoundTouch/Makefile.am soundtouch/source/SoundTouch/InterpolateLinear.h soundtouch/source/SoundTouch/SoundTouch.vcproj soundtouch/source/SoundTouch/InterpolateShannon.cpp soundtouch/source/SoundTouch/PeakFinder.h soundtouch/source/SoundTouch/cpu_detect_x86.cpp soundtouch/source/SoundTouch/SoundTouch.dsw soundtouch/source/SoundTouch/AAFilter.cpp soundtouch/source/SoundTouch/AAFilter.h soundtouch/source/SoundTouch/cpu_detect.h soundtouch/source/SoundTouch/RateTransposer.cpp soundtouch/source/SoundTouch/SoundTouch.dsp soundtouch/source/SoundTouch/TDStretch.h soundtouch/source/SoundTouch/SoundTouch.sln soundtouch/source/SoundTouch/mmx_optimized.cpp soundtouch/source/Android-lib/ soundtouch/source/Android-lib/jni/ soundtouch/source/Android-lib/jni/soundtouch-jni.cpp soundtouch/source/Android-lib/jni/Application.mk soundtouch/source/Android-lib/jni/Android.mk soundtouch/source/Android-lib/.classpath soundtouch/source/Android-lib/res/ soundtouch/source/Android-lib/res/drawable-mdpi/ soundtouch/source/Android-lib/res/drawable-mdpi/ic_launcher.png soundtouch/source/Android-lib/res/values/ soundtouch/source/Android-lib/res/values/styles.xml soundtouch/source/Android-lib/res/values/strings.xml soundtouch/source/Android-lib/res/layout/ soundtouch/source/Android-lib/res/layout/activity_example.xml soundtouch/source/Android-lib/res/drawable-xxhdpi/ soundtouch/source/Android-lib/res/drawable-xxhdpi/ic_launcher.png soundtouch/source/Android-lib/res/drawable-ldpi/ soundtouch/source/Android-lib/res/drawable-xhdpi/ soundtouch/source/Android-lib/res/drawable-xhdpi/ic_launcher.png soundtouch/source/Android-lib/res/drawable-hdpi/ soundtouch/source/Android-lib/res/drawable-hdpi/ic_launcher.png soundtouch/source/Android-lib/lint.xml soundtouch/source/Android-lib/.project soundtouch/source/Android-lib/src/ soundtouch/source/Android-lib/src/net/ soundtouch/source/Android-lib/src/net/surina/ soundtouch/source/Android-lib/src/net/surina/soundtouch/ soundtouch/source/Android-lib/src/net/surina/soundtouch/SoundTouch.java soundtouch/source/Android-lib/src/net/surina/ExampleActivity.java soundtouch/source/Android-lib/README-SoundTouch-Android.html soundtouch/source/Android-lib/.settings/ soundtouch/source/Android-lib/proguard-project.txt soundtouch/source/Android-lib/project.properties soundtouch/source/Android-lib/AndroidManifest.xml soundtouch/make-win.bat soundtouch/soundtouch.m4 soundtouch/lib/ soundtouch/bin/ soundtouch/bin/run_test.cmd soundtouch/bin/run_test
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.