• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AudioUnitUninitialize函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ca_close

void ca_close(phastream_t *as) {
	ca_dev *cadev = (ca_dev *) as->drvinfo;

	DBG_DYNA_AUDIO_DRV("** Closing audio stream\n");


	verify_noerr(AudioDeviceStop(get_audiodeviceid(cadev->inputID), input_proc));

	clean_input_device(as);

	verify_noerr(AudioOutputUnitStop(cadev->outputAU));
	verify_noerr(AudioUnitUninitialize (cadev->outputAU));

	printf("phad_coreaudio:ca_close:cleaning cadev\n"); // power pc hack 2/2
	
	if (cadev) {
		if (cadev->convertedInputBuffer) {
			free(cadev->convertedInputBuffer);
		}
		cadev->convertedInputBuffer = NULL;
		if (cadev->inputConverter) {
			AudioConverterDispose(cadev->inputConverter);
			cadev->inputConverter = NULL;
		}
		free(cadev);
		as->drvinfo = 0;
	}
}
开发者ID:gabrieldelsaint,项目名称:UIM,代码行数:28,代码来源:phmedia-coreaudio.c


示例2: close_coreaudio

static int close_coreaudio(audio_output_t *ao)
{
	mpg123_coreaudio_t* ca = (mpg123_coreaudio_t*)ao->userptr;

	if (ca) {
		ca->decode_done = 1;
		while(!ca->play_done && ca->play) usleep(10000);
		
		/* No matter the error code, we want to close it (by brute force if necessary) */
		AudioConverterDispose(ca->converter);
		AudioOutputUnitStop(ca->outputUnit);
		AudioUnitUninitialize(ca->outputUnit);
		CloseComponent(ca->outputUnit);
	
	    /* Free the ring buffer */
		sfifo_close( &ca->fifo );
		
		/* Free the conversion buffer */
		if (ca->buffer) {
			free( ca->buffer );
			ca->buffer = NULL;
		}
		
	}
	
	return 0;
}
开发者ID:abraxasrex,项目名称:mpk-mini-js,代码行数:27,代码来源:coreaudio.c


示例3: AudioOutputUnitStop

void CoreAudioDriver::disconnect()
{
	OSStatus err = noErr;
	err = AudioOutputUnitStop( m_outputUnit );
	err = AudioUnitUninitialize( m_outputUnit );
	err = AudioComponentInstanceDispose( m_outputUnit );
}
开发者ID:AdamFf,项目名称:hydrogen,代码行数:7,代码来源:coreaudio_driver.cpp


示例4: gst_core_audio_close

gboolean
gst_core_audio_close (GstCoreAudio * core_audio)
{
  OSStatus status;

  /* Uninitialize the AudioUnit */
  status = AudioUnitUninitialize (core_audio->audiounit);
  if (status) {
    GST_ERROR_OBJECT (core_audio, "Failed to uninitialize AudioUnit: %d",
        (int) status);
    return FALSE;
  }

  AudioUnitRemovePropertyListenerWithUserData (core_audio->audiounit,
      kAudioUnitProperty_AudioChannelLayout, _audio_unit_property_listener,
      core_audio);
  AudioUnitRemovePropertyListenerWithUserData (core_audio->audiounit,
      kAudioUnitProperty_StreamFormat, _audio_unit_property_listener,
      core_audio);

  /* core_audio->osxbuf is already locked at this point */
  core_audio->cached_caps_valid = FALSE;
  gst_caps_replace (&core_audio->cached_caps, NULL);

  AudioComponentInstanceDispose (core_audio->audiounit);
  core_audio->audiounit = NULL;
  return TRUE;
}
开发者ID:thiblahute,项目名称:gst-plugins-good,代码行数:28,代码来源:gstosxcoreaudio.c


示例5: OSSpinLockLock

CoreAudioOutput::~CoreAudioOutput()
{
	OSSpinLockLock(_spinlockAU);
	
	if(_au != NULL)
	{
		AudioOutputUnitStop(_au);
		AudioUnitUninitialize(_au);
#if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
		if (IsOSXVersionSupported(10, 6, 0))
		{
			AudioComponentInstanceDispose(_au);
		}
		else
		{
			CloseComponent(_au);
		}
#else
		CloseComponent(_au);
#endif
		_au = NULL;
	}
	
	OSSpinLockUnlock(_spinlockAU);
	
	delete _buffer;
	_buffer = NULL;
	
	free(_spinlockAU);
	_spinlockAU = NULL;
}
开发者ID:MoochMcGee,项目名称:desmume-plus,代码行数:31,代码来源:coreaudiosound.cpp


示例6: AudioOutputUnitStop

void CoreAudioDriver::disconnect()
{
	OSStatus err = noErr;
	err = AudioOutputUnitStop( m_outputUnit );
	err = AudioUnitUninitialize( m_outputUnit );
	err = CloseComponent( m_outputUnit );
}
开发者ID:Cesmith2,项目名称:hydrogen,代码行数:7,代码来源:coreaudio_driver.cpp


示例7: coreaudio_driver_delete

/** free all memory allocated by a driver instance
*/
static void coreaudio_driver_delete(coreaudio_driver_t * driver)
{
 	AudioDeviceRemovePropertyListener(driver->device_id, 0, true, kAudioDeviceProcessorOverload, notification);
    free(driver->input_list);
 	AudioUnitUninitialize(driver->au_hal);
	CloseComponent(driver->au_hal);
    free(driver);
}
开发者ID:Llefjord,项目名称:jack1,代码行数:10,代码来源:coreaudio_driver.c


示例8: au_unconfigure

static void au_unconfigure(AUData *d) {
	if (d->write_started==FALSE && d->read_started==FALSE) {
		AudioUnitUninitialize(d->io_unit);
		AudioOutputUnitStop(d->io_unit);
		AudioComponentInstanceDispose (d->io_unit);
		d->started=FALSE;
	}
}
开发者ID:cybertk,项目名称:blackberry-linphone,代码行数:8,代码来源:msiounit.c


示例9: iOSCoreAudioShutdown

void iOSCoreAudioShutdown()
{
    if (audioInstance) {
        AudioOutputUnitStop(audioInstance);
        AudioUnitUninitialize(audioInstance);
        AudioComponentInstanceDispose(audioInstance);
        audioInstance = nil;
    }
}
开发者ID:173210,项目名称:ppsspp,代码行数:9,代码来源:iOSCoreAudio.cpp


示例10: AudioUnitUninitialize

void CCoreAudioUnit::Close()
{
  if (m_Initialized)
    AudioUnitUninitialize(m_Component);
  if (m_Component)
    CloseComponent(m_Component);
  m_Initialized = false;
  m_Component = 0;
}
开发者ID:flyingtime,项目名称:boxee,代码行数:9,代码来源:CoreAudio.cpp


示例11: AudioOutputUnitStop

void AudioLoopImplCocoa::shutdown()
{
    if (initialized)
    {
        AudioOutputUnitStop(audioUnit);
        AudioUnitUninitialize(audioUnit);
        AudioComponentInstanceDispose(audioUnit);
        audioUnit = NULL;
    }
}
开发者ID:arielm,项目名称:new-chronotext-toolkit,代码行数:10,代码来源:AudioLoopImplCocoa.cpp


示例12: ca_stop_playback

static void ca_stop_playback(ALCdevice *device)
{
    ca_data *data = (ca_data*)device->ExtraData;
    OSStatus err;

    AudioOutputUnitStop(data->audioUnit);
    err = AudioUnitUninitialize(data->audioUnit);
    if(err != noErr)
        ERR("-- AudioUnitUninitialize failed.\n");
}
开发者ID:9heart,项目名称:DT3,代码行数:10,代码来源:coreaudio.c


示例13: ca_close_playback

static void ca_close_playback(ALCdevice *device)
{
    ca_data *data = (ca_data*)device->ExtraData;

    AudioUnitUninitialize(data->audioUnit);
    CloseComponent(data->audioUnit);

    free(data);
    device->ExtraData = NULL;
}
开发者ID:carriercomm,项目名称:openal-soft-chowdren,代码行数:10,代码来源:coreaudio.c


示例14: gst_core_audio_unitialize

void
gst_core_audio_unitialize (GstCoreAudio * core_audio)
{
  AudioUnitUninitialize (core_audio->audiounit);

  if (core_audio->recBufferList) {
    buffer_list_free (core_audio->recBufferList);
    core_audio->recBufferList = NULL;
  }
}
开发者ID:jcaden,项目名称:gst-plugins-good,代码行数:10,代码来源:gstosxcoreaudio.c


示例15: osx_output_close

static void
osx_output_close(struct audio_output *ao)
{
	struct osx_output *od = (struct osx_output *)ao;

	AudioOutputUnitStop(od->au);
	AudioUnitUninitialize(od->au);

	fifo_buffer_free(od->buffer);
}
开发者ID:Acidburn0zzz,项目名称:mpd,代码行数:10,代码来源:osx_output_plugin.c


示例16: capture_finish

void AudioDriverCoreAudio::finish() {
	capture_finish();

	if (audio_unit) {
		OSStatus result;

		lock();

		AURenderCallbackStruct callback;
		zeromem(&callback, sizeof(AURenderCallbackStruct));
		result = AudioUnitSetProperty(audio_unit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, kOutputBus, &callback, sizeof(callback));
		if (result != noErr) {
			ERR_PRINT("AudioUnitSetProperty failed");
		}

		if (active) {
			result = AudioOutputUnitStop(audio_unit);
			if (result != noErr) {
				ERR_PRINT("AudioOutputUnitStop failed");
			}

			active = false;
		}

		result = AudioUnitUninitialize(audio_unit);
		if (result != noErr) {
			ERR_PRINT("AudioUnitUninitialize failed");
		}

#ifdef OSX_ENABLED
		AudioObjectPropertyAddress prop;
		prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
		prop.mScope = kAudioObjectPropertyScopeGlobal;
		prop.mElement = kAudioObjectPropertyElementMaster;

		result = AudioObjectRemovePropertyListener(kAudioObjectSystemObject, &prop, &output_device_address_cb, this);
		if (result != noErr) {
			ERR_PRINT("AudioObjectRemovePropertyListener failed");
		}
#endif

		result = AudioComponentInstanceDispose(audio_unit);
		if (result != noErr) {
			ERR_PRINT("AudioComponentInstanceDispose failed");
		}

		audio_unit = NULL;
		unlock();
	}

	if (mutex) {
		memdelete(mutex);
		mutex = NULL;
	}
}
开发者ID:Calinou,项目名称:godot,代码行数:55,代码来源:audio_driver_coreaudio.cpp


示例17: aubio_audio_unit_stop

sint_t aubio_audio_unit_stop(aubio_audio_unit_t *o)
{
  if (o->audio_unit == NULL) return -1;
  OSStatus err = AudioOutputUnitStop (o->audio_unit);
  if (err) { AUBIO_WRN("audio_unit: failed stopping audio unit (%d)\n", (int)err); }
  err = AudioUnitUninitialize (o->audio_unit);
  if (err) { AUBIO_WRN("audio_unit: failed unitializing audio unit (%d)\n", (int)err); }
  err = AudioSessionSetActive(false);
  if (err) { AUBIO_WRN("audio_unit: failed stopping audio session (%d)\n", (int)err); }
  return err;
}
开发者ID:Craig-J,项目名称:RhythMIR,代码行数:11,代码来源:audio_unit.c


示例18: Audio_close

static void Audio_close(Audio *audio, const char *alias)
{
   /* uninitialize audio device */
   AudioUnitUninitialize(audio->device);

   /* close audio device */
   CloseComponent(audio->device);

   /* close audio file */
   ExtAudioFileDispose(audio->file);
}
开发者ID:ljmljz,项目名称:MMDAgent,代码行数:11,代码来源:Audio_Thread.cpp


示例19: coreaudio_object_close

void
coreaudio_object_close(struct audio_object *object)
{
	struct coreaudio_object *self = to_coreaudio_object(object);
	if(self->initialized) {
		AudioUnitUninitialize(self->outputUnit);
		AudioComponentInstanceDispose(self->outputUnit);
		TPCircularBufferCleanup(&(self->circularBuffer));
		self->initialized = FALSE;
	}

}
开发者ID:CMB,项目名称:pcaudiolib,代码行数:12,代码来源:coreaudio.c


示例20: CloseDefaultAU

void CloseDefaultAU () {
	OSStatus err = noErr;

	err = AudioOutputUnitStop (gOutputUnit);
	if (err) { printf ("AudioOutputUnitStop=%ld\n", (long int)err); }

	err = AudioUnitUninitialize (gOutputUnit);
	if (err) { printf ("AudioUnitUninitialize=%ld\n", (long int)err); }

	AudioComponentInstanceDispose (gOutputUnit);

	if (inputBuffer) deallocAudioBufferList(inputBuffer);
}
开发者ID:drumsoft,项目名称:OtoPerl,代码行数:13,代码来源:audiounit.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AuraCheckProcFn函数代码示例发布时间:2022-05-30
下一篇:
C++ AudioUnitSetProperty函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap