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

C++ AudioOutputUnitStop函数代码示例

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

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



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

示例1: AudioOutputUnitStop

void AudioDestinationMac::stop()
{
    OSStatus result = AudioOutputUnitStop(m_outputUnit);

    if (!result)
        m_isPlaying = false;

    // LabSound
    result = AudioOutputUnitStop(m_input->m_inputUnit);
}
开发者ID:cor3ntin,项目名称:LabSound,代码行数:10,代码来源:AudioDestinationMac.cpp


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


示例4: audio_unit_interruption_listener

/* interruption listeners */
void audio_unit_interruption_listener(void *closure, UInt32 inInterruptionState)
{
  OSStatus err = 0;
  aubio_audio_unit_t *o = (aubio_audio_unit_t *) closure;
  AudioUnit this_unit = o->audio_unit;

  if (inInterruptionState == kAudioSessionEndInterruption) {
    AUBIO_WRN("audio_unit: session interruption ended\n");
    err = AudioSessionSetActive(true);
    if (err) {
      AUBIO_ERR("audio_unit: could not make session active after interruption (%d)\n", (int)err);
      goto fail;
    }
    err = AudioOutputUnitStart(this_unit);
    if (err) {
      AUBIO_ERR("audio_unit: failed starting unit (%d)\n", (int)err);
      goto fail;
    }
  }
  if (inInterruptionState == kAudioSessionBeginInterruption) {
    AUBIO_WRN("audio_unit: session interruption started\n");
    err = AudioOutputUnitStop(this_unit);
    if (err) {
      AUBIO_ERR("audio_unit: could not stop unit at interruption (%d)\n", (int)err);
      goto fail;
    }
    err = AudioSessionSetActive(false);
    if (err) {
      AUBIO_ERR("audio_unit: could not make session inactive after interruption (%d)\n", (int)err);
      goto fail;
    }
  }
fail:
  return;
}
开发者ID:Craig-J,项目名称:RhythMIR,代码行数:36,代码来源:audio_unit.c


示例5: ca_stop_capture

static void ca_stop_capture(ALCdevice *device)
{
    ca_data *data = (ca_data*)device->ExtraData;
    OSStatus err = AudioOutputUnitStop(data->audioUnit);
    if(err != noErr)
        ERR("AudioOutputUnitStop failed\n");
}
开发者ID:carriercomm,项目名称:openal-soft-chowdren,代码行数:7,代码来源:coreaudio.c


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


示例7: COREAUDIO_CloseDevice

static void
COREAUDIO_CloseDevice(_THIS)
{
    if (this->hidden != NULL) {
        if (this->hidden->audioUnitOpened) {
            OSStatus result = noErr;
            AURenderCallbackStruct callback;
            const AudioUnitElement output_bus = 0;
            const AudioUnitElement input_bus = 1;
            const int iscapture = this->iscapture;
            const AudioUnitElement bus =
                ((iscapture) ? input_bus : output_bus);
            const AudioUnitScope scope =
                ((iscapture) ? kAudioUnitScope_Output :
                 kAudioUnitScope_Input);

            /* stop processing the audio unit */
            result = AudioOutputUnitStop(this->hidden->audioUnit);

            /* Remove the input callback */
            SDL_memset(&callback, '\0', sizeof(AURenderCallbackStruct));
            result = AudioUnitSetProperty(this->hidden->audioUnit,
                                          kAudioUnitProperty_SetRenderCallback,
                                          scope, bus, &callback,
                                          sizeof(callback));

            //CloseComponent(this->hidden->audioUnit);
            this->hidden->audioUnitOpened = 0;
        }
        SDL_free(this->hidden->buffer);
        SDL_free(this->hidden);
        this->hidden = NULL;
    }
}
开发者ID:arcanon,项目名称:ipadflash,代码行数:34,代码来源:SDL_coreaudio_iphone.c


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


示例9: AudioOutputUnitStop

void AudioDestinationMac::stop()
{
    OSStatus result = AudioOutputUnitStop(m_outputUnit);

    if (!result)
        setIsPlaying(false);
}
开发者ID:caiolima,项目名称:webkit,代码行数:7,代码来源:AudioDestinationMac.cpp


示例10: coreaudio_free

static void coreaudio_free(void *data)
{
   coreaudio_t *dev = (coreaudio_t*)data;

   if (!dev)
      return;

   if (dev->dev_alive)
   {
      AudioOutputUnitStop(dev->dev);
#if (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__)))
      CloseComponent(dev->dev);
#else
      AudioComponentInstanceDispose(dev->dev);
#endif
   }

   if (dev->buffer)
      fifo_free(dev->buffer);

   slock_free(dev->lock);
   scond_free(dev->cond);

   free(dev);
}
开发者ID:Ezio-PS,项目名称:RetroArch,代码行数:25,代码来源:coreaudio.c


示例11: coreaudio_free

static void coreaudio_free(void *data)
{
   coreaudio_t *dev = (coreaudio_t*)data;

   if (!dev)
      return;

   if (dev->dev_alive)
   {
      AudioOutputUnitStop(dev->dev);
#ifdef OSX_PPC
      CloseComponent(dev->dev);
#else
      AudioComponentInstanceDispose(dev->dev);
#endif
   }

   if (dev->buffer)
      fifo_free(dev->buffer);

   slock_free(dev->lock);
   scond_free(dev->cond);

   free(dev);
}
开发者ID:ColinKinloch,项目名称:RetroArch,代码行数:25,代码来源:coreaudio.c


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


示例13: AudioOutputUnitStop

void AudioDriverOSX::finish() {

	if (active)
		AudioOutputUnitStop(audio_unit);

	memdelete_arr(samples_in);
};
开发者ID:baekdahl,项目名称:godot,代码行数:7,代码来源:audio_driver_osx.cpp


示例14: Core_CloseAudio

void Core_CloseAudio(_THIS)
{
    OSStatus result;
    struct AURenderCallbackStruct callback;

    /* stop processing the audio unit */
    result = AudioOutputUnitStop (outputAudioUnit);
    if (result != noErr) {
        SDL_SetError("Core_CloseAudio: AudioOutputUnitStop");
        return;
    }

    /* Remove the input callback */
    callback.inputProc = 0;
    callback.inputProcRefCon = 0;
    result = AudioUnitSetProperty (outputAudioUnit, 
                        kAudioUnitProperty_SetRenderCallback,
                        kAudioUnitScope_Input, 
                        0,
                        &callback, 
                        sizeof(callback));
    if (result != noErr) {
        SDL_SetError("Core_CloseAudio: AudioUnitSetProperty (kAudioUnitProperty_SetInputCallback)");
        return;
    }

    result = CloseComponent(outputAudioUnit);
    if (result != noErr) {
        SDL_SetError("Core_CloseAudio: CloseComponent");
        return;
    }
    
    SDL_free(buffer);
}
开发者ID:ahpho,项目名称:wowmapviewer,代码行数:34,代码来源:SDL_coreaudio.c


示例15: coreaudio_pause

static int
coreaudio_pause(void) {

    state = OUTPUT_STATE_PAUSED;
	AudioOutputUnitStop(output_unit);

    return 0;
}
开发者ID:amitkr,项目名称:deadbeef,代码行数:8,代码来源:coreaudio.c


示例16: coreaudio_stop

static bool coreaudio_stop(void *data)
{
   coreaudio_t *dev = (coreaudio_t*)data;
   if (!dev)
      return false;
   dev->is_paused = (AudioOutputUnitStop(dev->dev) == noErr) ? true : false;
   return dev->is_paused ? true : false;
}
开发者ID:ColinKinloch,项目名称:RetroArch,代码行数:8,代码来源:coreaudio.c


示例17: AudioOutputUnitStop

void AudioLoopImplCocoa::stop()
{
    if (initialized)
    {
        OSStatus err = AudioOutputUnitStop(audioUnit);
        if (err) printf("AudioOutputUnitStop ERROR: %d\n", (int)err);
    }
}
开发者ID:arielm,项目名称:new-chronotext-toolkit,代码行数:8,代码来源:AudioLoopImplCocoa.cpp


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


示例19: audiounit_stream_stop

static int
audiounit_stream_stop(cubeb_stream * stm)
{
  OSStatus r;
  r = AudioOutputUnitStop(stm->unit);
  assert(r == 0);
  stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_STOPPED);
  return CUBEB_OK;
}
开发者ID:BrunoReX,项目名称:palemoon,代码行数:9,代码来源:cubeb_audiounit.c


示例20: AudioOutputUnitStop

bool CCoreAudioUnit::Stop()
{
  if (!m_audioUnit)
    return false;

  AudioOutputUnitStop(m_audioUnit);

  return true;
}
开发者ID:midripps,项目名称:xbmc,代码行数:9,代码来源:CoreAudioAEHALIOS.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ AudioQueueEnqueueBuffer函数代码示例发布时间:2022-05-30
下一篇:
C++ AudioOutputUnitStart函数代码示例发布时间: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