當前位置: 首頁>>代碼示例>>C++>>正文


C++ AudioUnitUninitialize函數代碼示例

本文整理匯總了C++中AudioUnitUninitialize函數的典型用法代碼示例。如果您正苦於以下問題:C++ AudioUnitUninitialize函數的具體用法?C++ AudioUnitUninitialize怎麽用?C++ AudioUnitUninitialize使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AudioUnitUninitialize函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的AudioUnitUninitialize函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。