当前位置: 首页>>代码示例>>C++>>正文


C++ speex_resampler_destroy函数代码示例

本文整理汇总了C++中speex_resampler_destroy函数的典型用法代码示例。如果您正苦于以下问题:C++ speex_resampler_destroy函数的具体用法?C++ speex_resampler_destroy怎么用?C++ speex_resampler_destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了speex_resampler_destroy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: stop

COggVorbisFileHelper::~COggVorbisFileHelper()
{
	stop();
	bStopDecoding = true;
	while(mDecThread.thread_status == CThread::TRUNNING) 
	{
		s3eDebugTracePrintf("waiting decoding thread terminating\n");
		s3eDeviceYield(10);
	}

	if(mDecBuffer != NULL)
	{
		delete mDecBuffer;
		mDecBuffer = NULL;
	}
	//cleanup();

	if(res_contR)	speex_resampler_destroy(res_contR);
	if(res_contL)	speex_resampler_destroy(res_contL);

	delete [] iFilterBufferL;
	delete [] iFilterBufferR;
	delete [] dFilterCoefficients;

	delete [] m_outL;
	delete [] m_outR;

	/*if(nStatus != OH_NAN) ov_clear(&vf);*/
	
}
开发者ID:arf-it,项目名称:marmalade-libvorbis,代码行数:30,代码来源:oggHelper.cpp

示例5: g_free

RtpAudioStream::~RtpAudioStream()
{
    for (int i = 0; i < rtp_packets_.size(); i++) {
        rtp_packet_t *rtp_packet = rtp_packets_[i];
        g_free(rtp_packet->info);
        g_free(rtp_packet->payload_data);
        g_free(rtp_packet);
    }
    g_hash_table_destroy(decoders_hash_);
    if (audio_resampler_) speex_resampler_destroy (audio_resampler_);
    speex_resampler_destroy (visual_resampler_);
}
开发者ID:DHODoS,项目名称:wireshark,代码行数:12,代码来源:rtp_audio_stream.cpp

示例6: kill_filter_audio

void kill_filter_audio(Filter_Audio *f_a)
{
    if (!f_a) {
        return;
    }

    WebRtcNsx_Free(f_a->noise_sup_x);
    WebRtcAgc_Free(f_a->gain_control);
    WebRtcAec_Free(f_a->echo_cancellation);
    WebRtcVad_Free(f_a->Vad_handle);
    speex_resampler_destroy(f_a->upsampler);
    speex_resampler_destroy(f_a->downsampler);
    speex_resampler_destroy(f_a->downsampler_echo);
    free(f_a);
}
开发者ID:isotoxin,项目名称:filter_audio,代码行数:15,代码来源:filter_audio.c

示例7: speex_resampler_destroy

 void Resampler::destroyResampler()
 {
     if(NULL != resampler_){
         speex_resampler_destroy(resampler_);
         resampler_ = NULL;
     }
 }
开发者ID:taqu,项目名称:opus,代码行数:7,代码来源:Resampler.cpp

示例8: 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

示例9: speex_resampler_destroy

Channel::~Channel()
{
	if (resampler) {
		speex_resampler_destroy(resampler);
		resampler = 0;
	}
}
开发者ID:Achilleshiel,项目名称:OpenRCT2,代码行数:7,代码来源:mixer.cpp

示例10: Close

static void Close (vlc_object_t *obj)
{
    filter_t *filter = (filter_t *)obj;
    SpeexResamplerState *st = (SpeexResamplerState *)filter->p_sys;

    speex_resampler_destroy (st);
}
开发者ID:Aki-Liang,项目名称:vlc-2.1.0.oldlib-2010,代码行数:7,代码来源:speex.c

示例11: speex_resampler_destroy

AudioOutputSample::~AudioOutputSample() {
	if (srs)
		speex_resampler_destroy(srs);

	delete sfHandle;
	sfHandle = NULL;
}
开发者ID:EarlOfWenc,项目名称:mumble,代码行数:7,代码来源:AudioOutputSample.cpp

示例12: Native_NATIVE

JNIEXPORT void JNICALL Native_NATIVE(speex_1resampler_1destroy)
	(JNIEnv *env, jclass that, jlong arg0)
{
	Native_NATIVE_ENTER(env, that, Native_speex_1resampler_1destroy_FUNC);
	speex_resampler_destroy((SpeexResamplerState *)(intptr_t)arg0);
	Native_NATIVE_EXIT(env, that, Native_speex_1resampler_1destroy_FUNC);
}
开发者ID:Arestin,项目名称:mumble-android,代码行数:7,代码来源:hawtjni_native.c

示例13: rl_resampler_destroy

void rl_resampler_destroy( rl_resampler_t* resampler )
{
  if ( resampler != (rl_resampler_t*)&passthrough )
  {
    speex_resampler_destroy( (SpeexResamplerState*)resampler );
  }
}
开发者ID:Feufochmar,项目名称:libretro-lutro,代码行数:7,代码来源:rl_resample.c

示例14: ebur128_destroy_resampler

static void ebur128_destroy_resampler(ebur128_state* st) {
  free(st->d->resampler_buffer_input);
  st->d->resampler_buffer_input = NULL;
  free(st->d->resampler_buffer_output);
  st->d->resampler_buffer_output = NULL;
  speex_resampler_destroy(st->d->resampler);
  st->d->resampler = NULL;
}
开发者ID:andrewrk,项目名称:libebur128,代码行数:8,代码来源:ebur128.c

示例15: ResamplePCM

	bool ResamplePCM(uint32 NumChannels, const TArray<uint8>& InBuffer, uint32 InSampleRate, TArray<uint8>& OutBuffer, uint32 OutSampleRate) const
	{
		// Initialize resampler to convert to desired rate for Opus
		int32 err = 0;
		SpeexResamplerState* resampler = speex_resampler_init(NumChannels, InSampleRate, OutSampleRate, SPEEX_RESAMPLER_QUALITY_DESKTOP, &err);
		if (err != RESAMPLER_ERR_SUCCESS)
		{
			speex_resampler_destroy(resampler);
			return false;
		}

		// Calculate extra space required for sample rate
		const uint32 SampleStride = SAMPLE_SIZE * NumChannels;
		const float Duration = (float)InBuffer.Num() / (InSampleRate * SampleStride);
		const int32 SafeCopySize = (Duration + 1) * OutSampleRate * SampleStride;
		OutBuffer.Empty(SafeCopySize);
		OutBuffer.AddUninitialized(SafeCopySize);
		uint32 InSamples = InBuffer.Num() / SampleStride;
		uint32 OutSamples = OutBuffer.Num() / SampleStride;

		// Do resampling and check results
		if (NumChannels == 1)
		{
			err = speex_resampler_process_int(resampler, 0, (const short*)(InBuffer.GetData()), &InSamples, (short*)(OutBuffer.GetData()), &OutSamples);
		}
		else
		{
			err = speex_resampler_process_interleaved_int(resampler, (const short*)(InBuffer.GetData()), &InSamples, (short*)(OutBuffer.GetData()), &OutSamples);
		}

		speex_resampler_destroy(resampler);
		if (err != RESAMPLER_ERR_SUCCESS)
		{
			return false;
		}

		// reduce the size of Out Buffer if more space than necessary was allocated
		const int32 WrittenBytes = (int32)(OutSamples * SampleStride);
		if (WrittenBytes < OutBuffer.Num())
		{
			OutBuffer.SetNum(WrittenBytes, true);
		}

		return true;
	}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:45,代码来源:AudioFormatOpus.cpp


注:本文中的speex_resampler_destroy函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。