本文整理汇总了C++中speex_preprocess_state_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ speex_preprocess_state_destroy函数的具体用法?C++ speex_preprocess_state_destroy怎么用?C++ speex_preprocess_state_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了speex_preprocess_state_destroy函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: wait
AudioInput::~AudioInput() {
bRunning = false;
wait();
if (ceEncoder) {
cCodec->celt_encoder_destroy(ceEncoder);
} else if (esSpeex) {
speex_bits_destroy(&sbBits);
speex_encoder_destroy(esSpeex);
}
foreach(short *buf, qlEchoFrames)
delete [] buf;
if (sppPreprocess)
speex_preprocess_state_destroy(sppPreprocess);
if (sesEcho)
speex_echo_state_destroy(sesEcho);
if (srsMic)
speex_resampler_destroy(srsMic);
if (srsEcho)
speex_resampler_destroy(srsEcho);
delete [] psMic;
delete [] psClean;
delete [] psSpeaker;
delete [] pfMicInput;
delete [] pfEchoInput;
delete [] pfOutput;
}
开发者ID:ashurta,项目名称:mumble,代码行数:32,代码来源:AudioInput.cpp
示例2: wait
AudioInput::~AudioInput() {
bRunning = false;
wait();
#ifdef USE_OPUS
if (opusState)
opus_encoder_destroy(opusState);
#endif
if (ceEncoder) {
cCodec->celt_encoder_destroy(ceEncoder);
}
foreach(short *buf, qlEchoFrames)
delete [] buf;
if (sppPreprocess)
speex_preprocess_state_destroy(sppPreprocess);
if (sesEcho)
speex_echo_state_destroy(sesEcho);
if (srsMic)
speex_resampler_destroy(srsMic);
if (srsEcho)
speex_resampler_destroy(srsEcho);
delete [] psMic;
delete [] psClean;
delete [] psSpeaker;
delete [] pfMicInput;
delete [] pfEchoInput;
delete [] pfOutput;
}
开发者ID:AceXare,项目名称:mumble,代码行数:34,代码来源:AudioInput.cpp
示例3: AudioQualityImprovement_free
static void
AudioQualityImprovement_free(AudioQualityImprovement *aqi)
{
/* mutex */
Mutex_free(aqi->mutex);
/* preprocess */
if (aqi->preprocess)
speex_preprocess_state_destroy(aqi->preprocess);
/* echo */
if (aqi->echo)
speex_echo_state_destroy(aqi->echo);
/* out */
if (aqi->out)
free(aqi->out);
/* play */
if (aqi->play)
free(aqi->play);
/* resampler */
if (aqi->resampler)
speex_resampler_destroy(aqi->resampler);
/* stringID */
free(aqi->stringID);
free(aqi);
}
开发者ID:AlertMe,项目名称:java-bells,代码行数:25,代码来源:AudioQualityImprovement.c
示例4: wait
AudioInput::~AudioInput() {
bRunning = false;
wait();
speex_bits_destroy(&sbBits);
speex_encoder_destroy(esEncState);
mumble_drft_clear(&fftTable);
jitter_buffer_destroy(jb);
if (sppPreprocess)
speex_preprocess_state_destroy(sppPreprocess);
if (sesEcho)
speex_echo_state_destroy(sesEcho);
if (srsMic)
speex_resampler_destroy(srsMic);
if (srsEcho)
speex_resampler_destroy(srsEcho);
delete [] psMic;
delete [] psSpeaker;
delete [] psClean;
if (pfMicInput)
delete [] pfMicInput;
if (pfEchoInput)
delete [] pfEchoInput;
if (pfOutput)
delete [] pfOutput;
}
开发者ID:ArminW,项目名称:re-whisper,代码行数:29,代码来源:AudioInput.cpp
示例5: speex_echo_state_destroy
JNIEXPORT void JNICALL Java_com_pullmi_shanghai_TalkActivity_speex_1EchoCanceller_1close
(JNIEnv *env, jobject jobj)
{
//close
speex_echo_state_destroy(st);
speex_preprocess_state_destroy(den);
}
开发者ID:hwppippo,项目名称:smartHouse,代码行数:7,代码来源:speex_jni.c
示例6: main
int main()
{
int echo_fd, ref_fd, e_fd;
float noise[NN+1];
short echo_buf[NN], ref_buf[NN], e_buf[NN];
SpeexEchoState *st;
SpeexPreprocessState *den;
echo_fd = open ("play.sw", O_RDONLY);
ref_fd = open ("rec.sw", O_RDONLY);
e_fd = open ("echo.sw", O_WRONLY | O_CREAT | O_TRUNC, 0644);
st = speex_echo_state_init(NN, 8*NN);
den = speex_preprocess_state_init(NN, 8000);
while (read(ref_fd, ref_buf, NN*2))
{
read(echo_fd, echo_buf, NN*2);
speex_echo_cancel(st, ref_buf, echo_buf, e_buf, noise);
speex_preprocess(den, e_buf, noise);
write(e_fd, e_buf, NN*2);
}
speex_echo_state_destroy(st);
speex_preprocess_state_destroy(den);
close(e_fd);
close(echo_fd);
close(ref_fd);
return 0;
}
开发者ID:VoxOx,项目名称:VoxOx,代码行数:29,代码来源:testecho.c
示例7: throw
bool SpeexPlugin::disablePreprocessing() throw(OperationNotPerfomedException) {
if (preprocess) {
speex_preprocess_state_destroy(preprocess);
return true;
}
return false;
}
开发者ID:txithihausen,项目名称:streamadapt,代码行数:7,代码来源:speexplugin.cpp
示例8: main
int main()
{
short in[NN];
int i;
SpeexPreprocessState *st;
int count=0;
float f;
st = speex_preprocess_state_init(NN, 8000);
i=1;
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
i=0;
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
f=8000;
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &f);
i=0;
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
f=.4;
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
f=.3;
speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
while (1)
{
int vad;
fread(in, sizeof(short), NN, stdin);
if (feof(stdin))
break;
vad = speex_preprocess(st, in, NULL);
/*fprintf (stderr, "%d\n", vad);*/
fwrite(in, sizeof(short), NN, stdout);
count++;
}
speex_preprocess_state_destroy(st);
return 0;
}
开发者ID:ACSPRI,项目名称:iaxclient-1,代码行数:35,代码来源:testdenoise.c
示例9: main
int main(int argc, char **argv)
{
int echo_fd, ref_fd, e_fd;
spx_int32_t noise[NN+1];
short echo_buf[NN], ref_buf[NN], e_buf[NN];
SpeexEchoState *st;
SpeexPreprocessState *den;
if (argc != 4)
{
fprintf (stderr, "testecho mic_signal.sw speaker_signal.sw output.sw\n");
exit(1);
}
echo_fd = open (argv[2], O_RDONLY);
ref_fd = open (argv[1], O_RDONLY);
e_fd = open (argv[3], O_WRONLY | O_CREAT | O_TRUNC, 0644);
st = speex_echo_state_init(NN, 8*NN);
den = speex_preprocess_state_init(NN, 8000);
while (read(ref_fd, ref_buf, NN*2))
{
read(echo_fd, echo_buf, NN*2);
speex_echo_cancel(st, ref_buf, echo_buf, e_buf, noise);
/*speex_preprocess(den, e_buf, noise);*/
write(e_fd, e_buf, NN*2);
}
speex_echo_state_destroy(st);
speex_preprocess_state_destroy(den);
close(e_fd);
close(echo_fd);
close(ref_fd);
return 0;
}
开发者ID:moteus,项目名称:mod_h323_deps,代码行数:34,代码来源:testecho.c
示例10: speex_filter_close
int speex_filter_close(AVFilterContext *avf)
{
SpeexFilterContext *s = avf->priv_data;
speex_preprocess_state_destroy(s->preproc);
return 0;
}
开发者ID:paranojik,项目名称:multitv,代码行数:8,代码来源:speex.c
示例11: pa_speex_ec_init
bool pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
pa_sample_spec *rec_ss, pa_channel_map *rec_map,
pa_sample_spec *play_ss, pa_channel_map *play_map,
pa_sample_spec *out_ss, pa_channel_map *out_map,
uint32_t *nframes, const char *args) {
int rate;
uint32_t frame_size_ms, filter_size_ms;
pa_modargs *ma;
if (!(ma = pa_modargs_new(args, valid_modargs))) {
pa_log("Failed to parse submodule arguments.");
goto fail;
}
filter_size_ms = DEFAULT_FILTER_SIZE_MS;
if (pa_modargs_get_value_u32(ma, "filter_size_ms", &filter_size_ms) < 0 || filter_size_ms < 1 || filter_size_ms > 2000) {
pa_log("Invalid filter_size_ms specification");
goto fail;
}
frame_size_ms = DEFAULT_FRAME_SIZE_MS;
if (pa_modargs_get_value_u32(ma, "frame_size_ms", &frame_size_ms) < 0 || frame_size_ms < 1 || frame_size_ms > 200) {
pa_log("Invalid frame_size_ms specification");
goto fail;
}
pa_speex_ec_fixate_spec(rec_ss, rec_map, play_ss, play_map, out_ss, out_map);
rate = out_ss->rate;
*nframes = pa_echo_canceller_blocksize_power2(rate, frame_size_ms);
pa_log_debug ("Using nframes %d, channels %d, rate %d", *nframes, out_ss->channels, out_ss->rate);
ec->params.priv.speex.state = speex_echo_state_init_mc(*nframes, (rate * filter_size_ms) / 1000, out_ss->channels, out_ss->channels);
if (!ec->params.priv.speex.state)
goto fail;
speex_echo_ctl(ec->params.priv.speex.state, SPEEX_ECHO_SET_SAMPLING_RATE, &rate);
if (!pa_speex_ec_preprocessor_init(ec, out_ss, *nframes, ma))
goto fail;
pa_modargs_free(ma);
return true;
fail:
if (ma)
pa_modargs_free(ma);
if (ec->params.priv.speex.pp_state) {
speex_preprocess_state_destroy(ec->params.priv.speex.pp_state);
ec->params.priv.speex.pp_state = NULL;
}
if (ec->params.priv.speex.state) {
speex_echo_state_destroy(ec->params.priv.speex.state);
ec->params.priv.speex.state = NULL;
}
return false;
}
开发者ID:DryakhlyyZlodey,项目名称:pulseaudio,代码行数:58,代码来源:speex.c
示例12: Java_com_haitou_xiaoyoupai_imservice_support_audio_Speex_destroyEcho
extern "C" JNIEXPORT void Java_com_haitou_xiaoyoupai_imservice_support_audio_Speex_destroyEcho(
JNIEnv * env, jobject jobj) {
if (aec_status == AEC_CLOSED)
return;
aec_status = AEC_CLOSED;
speex_echo_state_destroy(echoState);
speex_preprocess_state_destroy(den);
}
开发者ID:treejames,项目名称:FreshMAn-Task,代码行数:9,代码来源:speex_jni.cpp
示例13: volume_uninit
static void volume_uninit(MSFilter *f){
Volume *v=(Volume*)f->data;
#ifdef HAVE_SPEEXDSP
if (v->speex_pp)
speex_preprocess_state_destroy(v->speex_pp);
#endif
ms_bufferizer_destroy(v->buffer);
ms_free(f->data);
}
开发者ID:cybertk,项目名称:blackberry-linphone,代码行数:9,代码来源:msvolume.c
示例14: speexpp_destructor
static void speexpp_destructor(void *arg)
{
struct preproc *st = arg;
if (st->state)
speex_preprocess_state_destroy(st->state);
list_unlink(&st->af.le);
}
开发者ID:FOSSRIT,项目名称:baresip,代码行数:9,代码来源:speex_pp.c
示例15: Java_com_mogujie_tt_support_audio_Speex_destroyEcho
extern "C" JNIEXPORT void Java_com_mogujie_tt_support_audio_Speex_destroyEcho(
JNIEnv * env, jobject jobj) {
if (aec_status == AEC_CLOSED)
return;
aec_status = AEC_CLOSED;
speex_echo_state_destroy(echoState);
speex_preprocess_state_destroy(den);
}
开发者ID:10045125,项目名称:TTAndroidClient,代码行数:9,代码来源:speex_jni.cpp
示例16: roardsp_speex_prep_uninit
int roardsp_speex_prep_uninit (struct roardsp_filter * filter) {
struct roardsp_speex_prep * self = filter->inst;
if ( self->preprocess != NULL )
speex_preprocess_state_destroy(self->preprocess);
roar_mm_free(self);
return 0;
}
开发者ID:roaraudio,项目名称:roaraudio,代码行数:10,代码来源:filter_speex_prep.c
示例17: lintospeex_destroy
static void lintospeex_destroy(struct ast_trans_pvt *arg)
{
struct speex_coder_pvt *pvt = arg->pvt;
#ifdef _SPEEX_TYPES_H
if (preproc)
speex_preprocess_state_destroy(pvt->pp);
#endif
speex_encoder_destroy(pvt->speex);
speex_bits_destroy(&pvt->bits);
}
开发者ID:mtulio,项目名称:mtulio,代码行数:10,代码来源:codec_speex.c
示例18: tdav_speex_denoise_close
static int tdav_speex_denoise_close(tmedia_denoise_t* self)
{
tdav_speex_denoise_t *denoiser = (tdav_speex_denoise_t *)self;
if(denoiser->preprocess_state_record){
speex_preprocess_state_destroy(denoiser->preprocess_state_record);
denoiser->preprocess_state_record = tsk_null;
}
if(denoiser->preprocess_state_playback){
speex_preprocess_state_destroy(denoiser->preprocess_state_playback);
denoiser->preprocess_state_playback = tsk_null;
}
if(denoiser->echo_state){
speex_echo_state_destroy(denoiser->echo_state);
denoiser->echo_state = tsk_null;
}
TSK_FREE(denoiser->echo_output_frame);
return 0;
}
开发者ID:SayCV,项目名称:doubango,代码行数:20,代码来源:tdav_speex_denoise.c
示例19: channel_uninit
static void channel_uninit(Channel *chan){
ms_bufferizer_uninit(&chan->buff);
chan->is_speaking=0;
chan->energy=0;
chan->average_psd=0;
#ifndef DISABLE_SPEEX
if (chan->speex_pp!=NULL)
speex_preprocess_state_destroy(chan->speex_pp);
chan->speex_pp=NULL;
#endif
}
开发者ID:github188,项目名称:Sip-MCU,代码行数:11,代码来源:msconf.c
示例20: speex_preprocess_ctl
// Destructor
MprSpeexPreprocess::~MprSpeexPreprocess()
{
if (mpPreprocessState)
{
// detach echo canceller
speex_preprocess_ctl(mpPreprocessState, SPEEX_PREPROCESS_SET_ECHO_STATE, NULL);
// free mpPreprocessState
speex_preprocess_state_destroy(mpPreprocessState);
mpPreprocessState = NULL;
}
}
开发者ID:Jaroslav23,项目名称:sipxtapi,代码行数:12,代码来源:MprSpeexPreProcess.cpp
注:本文中的speex_preprocess_state_destroy函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论