原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://yarin.blog.51cto.com/1130898/640398
- mSoundTouch.setSampleRate(sampleRate);//设置声音的采样频率
- mSoundTouch.setChannels(channels);//设置声音的声道
- m_SoundTouch.setTempoChange(tempoDelta); //这个就是传说中的变速不变调
- m_SoundTouch.setPitchSemiTones(pitchDelta);//设置声音的pitch
- mSoundTouch.setRateChange(rateDelta);//设置声音的速率
- // quick是一个bool变量,USE_QUICKSEEK具体有什么用我暂时也不太清楚。
- mSoundTouch.setSetting(SETTING_USE_QUICKSEEK, quick);
- // noAntiAlias是一个bool变量,USE_AA_FILTER具体有什么用我暂时也不太清楚。
- mSoundTouch.setSetting(SETTING_USE_AA_FILTER, !(noAntiAlias));
- #if !(INTEGER_SAMPLES || FLOAT_SAMPLES)
- /// Choose either 32bit floating point or 16bit integer sampletype
- /// by choosing one of the following defines, unless this selection
- /// has already been done in some other file.
- ////
- /// Notes:
- /// - In Windows environment, choose the sample format with the
- /// following defines.
- /// - In GNU environment, the floating point samples are used by
- /// default, but integer samples can be chosen by giving the
- /// following switch to the configure script:
- /// ./configure --enable-integer-samples
- /// However, if you still prefer to select the sample format here
- /// also in GNU environment, then please #undef the INTEGER_SAMPLE
- /// and FLOAT_SAMPLE defines first as in comments above.
- #define INTEGER_SAMPLES 1 //< 16bit integer samples
- //#define FLOAT_SAMPLES 1 //< 32bit float samples
- #endif
- mSoundTouch.setChannels(2);//1则为单声道