您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CloseComponent函数代码示例

51自学网 2021-06-01 20:11:41
  C++
这篇教程C++ CloseComponent函数代码示例写得很实用,希望能帮到您。

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

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

示例1: QTDR_CloseDownHandlers

void QTDR_CloseDownHandlers (void){	if (gDataReader != NULL) {		DataHCloseForRead(gDataReader);		CloseComponent(gDataReader);		gDataReader = NULL;	}	if (gDataWriter != NULL) {		DataHCloseForWrite(gDataWriter);		CloseComponent(gDataWriter);		gDataWriter = NULL;	}		// dispose of the data buffer	if (gDataBuffer != NULL)		DisposePtr(gDataBuffer);			// dispose of the routine descriptors	if (gReadDataHCompletionUPP != NULL)		DisposeDataHCompletionUPP(gReadDataHCompletionUPP);			if (gWriteDataHCompletionUPP != NULL)		DisposeDataHCompletionUPP(gWriteDataHCompletionUPP);		gDoneTransferring = false;	#if TARGET_OS_WIN32	// kill the timer that tasks the data handlers	KillTimer(NULL, gTimerID);#endif}
开发者ID:fruitsamples,项目名称:ThreadsImporter,代码行数:32,


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


示例3: openMovSettingsPopup

void openMovSettingsPopup(TPropertyGroup *props, bool macBringToFront) {#ifdef _WIN32  if (InitializeQTML(0) != noErr) return;#endif  ComponentInstance ci =      OpenDefaultComponent(StandardCompressionType, StandardCompressionSubType);  QTAtomContainer atoms;  QTNewAtomContainer(&atoms);  fromPropertiesToAtoms(*props, atoms);  ComponentResult err;  if ((err = SCSetSettingsFromAtomContainer(ci, atoms)) != noErr) {    CloseComponent(ci);    ci = OpenDefaultComponent(StandardCompressionType,                              StandardCompressionSubType);    assert(false);  }  QTDisposeAtomContainer(atoms);#ifdef MACOSX// Install an external procedure to use a callback filter on the request// settings dialog// On MACOSX we need to change the dialog appearance in order to pop-up in front// of the// toonz main window./*gProcStruct.filterProc = NewSCModalFilterUPP(QTCmpr_FilterProc);// I don't install any hookgProcStruct.hookProc = NULL;gProcStruct.customName[0] = 0;// I don't use refcongProcStruct.refcon = 0;// set the current extended procsSCSetInfo(ci, scExtendedProcsType, &gProcStruct);*/#endif  err = SCRequestSequenceSettings(ci);  // assert(err==noErr);  QTAtomContainer atomsOut;  if (SCGetSettingsAsAtomContainer(ci, &atomsOut) != noErr) assert(false);  fromAtomsToProperties(atomsOut, *props);  QTDisposeAtomContainer(atomsOut);  CloseComponent(ci);  // int dataSize=0, numChildren = 0, numLevels=0;  // retrieveData(settings, kParentAtomIsContainer, dataSize, numChildren,  // numLevels);}
开发者ID:walkerka,项目名称:opentoonz,代码行数:59,


示例4: osx_output_enable

static boolosx_output_enable(struct audio_output *ao, GError **error_r){	struct osx_output *oo = (struct osx_output *)ao;	ComponentDescription desc;	desc.componentType = kAudioUnitType_Output;	desc.componentSubType = oo->component_subtype;	desc.componentManufacturer = kAudioUnitManufacturer_Apple;	desc.componentFlags = 0;	desc.componentFlagsMask = 0;	Component comp = FindNextComponent(NULL, &desc);	if (comp == 0) {		g_set_error(error_r, osx_output_quark(), 0,			    "Error finding OS X component");		return false;	}	OSStatus status = OpenAComponent(comp, &oo->au);	if (status != noErr) {		g_set_error(error_r, osx_output_quark(), status,			    "Unable to open OS X component: %s",			    GetMacOSStatusCommentString(status));		return false;	}	if (!osx_output_set_device(oo, error_r)) {		CloseComponent(oo->au);		return false;	}	AURenderCallbackStruct callback;	callback.inputProc = osx_render;	callback.inputProcRefCon = oo;	ComponentResult result =		AudioUnitSetProperty(oo->au,				     kAudioUnitProperty_SetRenderCallback,				     kAudioUnitScope_Input, 0,				     &callback, sizeof(callback));	if (result != noErr) {		CloseComponent(oo->au);		g_set_error(error_r, osx_output_quark(), result,			    "unable to set callback for OS X audio unit");		return false;	}	return true;}
开发者ID:Acidburn0zzz,项目名称:mpd,代码行数:50,


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


示例6: CoreAudioDrv_PCM_Shutdown

void CoreAudioDrv_PCM_Shutdown(void){	OSStatus result;	struct AudioUnitInputCallback callback;	if (!Initialised) {		return;	}	    // stop processing the audio unit	CoreAudioDrv_PCM_StopPlayback();	    // Remove the input callback	callback.inputProc = 0;	callback.inputProcRefCon = 0;	result = AudioUnitSetProperty(output_audio_unit,                                kAudioUnitProperty_SetInputCallback,                                kAudioUnitScope_Input,                                0,                                &callback,                                sizeof(callback));	result = CloseComponent(output_audio_unit);	pthread_mutex_destroy(&mutex);		Initialised = 0;}
开发者ID:JohnnyonFlame,项目名称:jfaudiolib,代码行数:27,


示例7: HGetVol

    //------------------------------------------------------------------------    bool pixel_map::save_as_qt(const char *filename) const    {		FSSpec						fss; 		OSErr						err;				// get file specification to application directory		err = HGetVol(nil, &fss.vRefNum, &fss.parID);		if (err == noErr)		{     		GraphicsExportComponent		ge;  			CopyCStringToPascal(filename, fss.name);  			// I decided to use PNG as output image file type.  			// There are a number of other available formats.  			// Should I check the file suffix to choose the image file format?			err = OpenADefaultComponent(GraphicsExporterComponentType, kQTFileTypePNG, &ge);			if (err == noErr)			{    			err = GraphicsExportSetInputGWorld(ge, m_pmap);	    		if (err == noErr)    			{    				err = GraphicsExportSetOutputFile (ge, &fss);    				if (err == noErr)    				{    					GraphicsExportDoExport(ge, nil);    				}    			}    			CloseComponent(ge);    		}    	}    	        return err == noErr;    }
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:33,


示例8: OsxAudioUnitsOutput_Destroy

/*----------------------------------------------------------------------|    OsxAudioUnitsOutput_Destroy+---------------------------------------------------------------------*/static BLT_ResultOsxAudioUnitsOutput_Destroy(OsxAudioUnitsOutput* self){    /* drain the queue */    OsxAudioUnitsOutput_Drain(&ATX_BASE(self, BLT_OutputNode));    /* stop the audio pump */    OsxAudioUnitsOutput_Stop(&ATX_BASE_EX(self, BLT_BaseMediaNode, BLT_MediaNode));        /* close the audio unit */    if (self->audio_unit) {        ComponentResult result;                result = CloseComponent(self->audio_unit);        if (result != noErr) {            ATX_LOG_WARNING_1("CloseComponent failed (%d)", (int)result);        }    }        /* destroy the queue */    ATX_List_Destroy(self->packet_queue);        /* destroy the lock */    pthread_mutex_destroy(&self->lock);        /* destruct the inherited object */    BLT_BaseMediaNode_Destruct(&ATX_BASE(self, BLT_BaseMediaNode));    /* free the object memory */    ATX_FreeMemory(self);    return BLT_SUCCESS;}
开发者ID:MattLeMay,项目名称:Bluetune,代码行数:36,


示例9: DirectAudioCodecClose

SMACsdec::~SMACsdec(){	if(mDecoder != NULL)	{#if USE_DIRECT_ADEC		DirectAudioCodecClose(mDecoder);#else		CloseComponent(mDecoder);#endif	}		delete[] mOutputBuffer;	delete[] mFloatBuffer;#if	TARGET_API_MAC_OSX	delete mThreadStateMutex;	mThreadStateMutex = NULL;#endif	#if	CaptureDataToFile	if(mOutputFileRefNum != -1)	{		FSCloseFork(mOutputFileRefNum);	}#endif}
开发者ID:MaddTheSane,项目名称:a52codec,代码行数:26,


示例10: qt_mac_createCGImageFromQImage

QList<QByteArray> QMacPasteboardMimePict::convertFromMime(const QString &mime, QVariant variant,                                                          QString flav){    QList<QByteArray> ret;    if (!resolveMimeQuickTimeSymbols())        return ret;    if (!canConvert(mime, flav))        return ret;    QCFType<CGImageRef> cgimage = qt_mac_createCGImageFromQImage(qvariant_cast<QImage>(variant));    Handle pic = NewHandle(0);    GraphicsExportComponent graphicsExporter;    ComponentResult result = OpenADefaultComponent(GraphicsExporterComponentType,                                                   kQTFileTypePicture, &graphicsExporter);    if (!result) {        unsigned long sizeWritten;        result = ptrGraphicsExportSetInputCGImage(graphicsExporter, cgimage);        if (!result)            result = ptrGraphicsExportSetOutputHandle(graphicsExporter, pic);        if (!result)            result = ptrGraphicsExportDoExport(graphicsExporter, &sizeWritten);        CloseComponent(graphicsExporter);    }    int size = GetHandleSize((Handle)pic);    // Skip the Picture File header (512 bytes) and feed the raw data    QByteArray ar(reinterpret_cast<char *>(*pic + 512), size - 512);    ret.append(ar);    DisposeHandle(pic);    return ret;}
开发者ID:FilipBE,项目名称:qtextended,代码行数:32,


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


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


示例13: osx_output_disable

static voidosx_output_disable(struct audio_output *ao){	struct osx_output *oo = (struct osx_output *)ao;	CloseComponent(oo->au);}
开发者ID:Acidburn0zzz,项目名称:mpd,代码行数:7,


示例14: qWarning

QVariant QMacPasteboardMimePict::convertToMime(const QString &mime, QList<QByteArray> data, QString flav){    if(data.count() > 1)        qWarning("QMacPasteboardMimePict: Cannot handle multiple member data");    QVariant ret;    if (!resolveMimeQuickTimeSymbols())        return ret;    if(!canConvert(mime, flav))        return ret;    const QByteArray &a = data.first();    // This function expects the 512 header (just to skip it, so create the extra space for it).    Handle pic = NewHandle(a.size() + 512);    memcpy(*pic + 512, a.constData(), a.size());    GraphicsImportComponent graphicsImporter;    ComponentResult result = OpenADefaultComponent(GraphicsImporterComponentType,                                                   kQTFileTypePicture, &graphicsImporter);    QCFType<CGImageRef> cgImage;    if (!result)        result = ptrGraphicsImportSetDataHandle(graphicsImporter, pic);    if (!result)        result = ptrGraphicsImportCreateCGImage(graphicsImporter, &cgImage,                                             kGraphicsImportCreateCGImageUsingCurrentSettings);    if (!result)        ret = QVariant(QPixmap::fromMacCGImageRef(cgImage).toImage());    CloseComponent(graphicsImporter);    DisposeHandle(pic);    return ret;}
开发者ID:FilipBE,项目名称:qtextended,代码行数:31,


示例15: verify_noerr

void AUEditWindow::CloseView (){	if (mEditView) {		verify_noerr(CloseComponent(mEditView));		mEditView = 0;	}}
开发者ID:fruitsamples,项目名称:Services,代码行数:7,


示例16: QuickTimeComponentVersion

int __stdcall QuickTimeComponentVersion(char *type, char *subtype) {    OSType real_type, real_subtype;    ComponentInstance ci;    long version;    // If we don't have QuickTime, we can't have any components, either.    if (QuickTimeVersion() == 0)        return 0;    // If our type or subtype is invalid, return 0.    if (strlen(type) != 4 || strlen(subtype) != 4)        return 0;    // Convert our type strings to Macintosh OSType codes.    real_type = (type[0] << 24 | type[1] << 16 | type[2] << 8 | type[3]);    real_subtype =        (subtype[0] << 24 | subtype[1] << 16 | subtype[2] << 8 | subtype[3]);    // Open up an instance of our component.    ci = OpenDefaultComponent(real_type, real_subtype);    if (!ci)        return 0;    // Get the version of our component.    version = GetComponentVersion(ci);    if (GetComponentInstanceError(ci) != noErr)        return 0;    // Close our component instance.    if (CloseComponent(ci) != noErr)        return 0;        return version;}
开发者ID:colonelqubit,项目名称:halyard,代码行数:34,


示例17: COREAUDIO_CloseDevice

static voidCOREAUDIO_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:DAOWAce,项目名称:pcsxr,代码行数:34,


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


示例19: InitializeQTExporters

void _HYPlatformGraphicPane::_SavePicture	(_String prompt){	InitializeQTExporters  ();	if (graphicsFormats.lLength)	{		_String filePath;		long 	menuChoice = SaveFileWithPopUp (filePath,											      savePicPrompt,prompt,savePicAs,graphicsFormats);			if (menuChoice>=0)		{			ComponentInstance grexc = OpenComponent ((Component)qtGrexComponents(menuChoice));			GraphicsExportSetInputGWorld (grexc,thePane);			FSSpec  fs;			Str255	buff;			StringToStr255 (filePath,buff);			FSMakeFSSpec(0,0,buff,&fs);			GraphicsExportSetOutputFile (grexc,&fs);			GraphicsExportRequestSettings (grexc,nil,nil); 					unsigned long dummy;			OSType t,c;					GraphicsExportGetDefaultFileTypeAndCreator (grexc,&t,&c);                           			GraphicsExportSetOutputFileTypeAndCreator (grexc,t,c);			GraphicsExportDoExport (grexc,&dummy);			            CloseComponent (grexc);        }    }}				
开发者ID:mdsmith,项目名称:OCLHYPHY,代码行数:28,


示例20: close_output

static void close_output(void){	if(dmp.fd == -1) return;	if(gNoteAllocator != NULL)		CloseComponent(gNoteAllocator);	dmp.fd = -1;	//disabled}
开发者ID:OS2World,项目名称:MM-SOUND-TiMidity-MCD,代码行数:7,


示例21: gst_osx_video_src_stop

static gbooleangst_osx_video_src_stop (GstBaseSrc * src){  GstOSXVideoSrc *self;  ComponentResult err;  self = GST_OSX_VIDEO_SRC (src);  GST_DEBUG_OBJECT (src, "stopping");  self->video_chan = NULL;  err = CloseComponent (self->seq_grab);  if (err != noErr)    GST_WARNING_OBJECT (self, "CloseComponent returned %d", (int) err);  self->seq_grab = NULL;  DisposeGWorld (self->world);  self->world = NULL;  if (self->buffer != NULL) {    gst_buffer_unref (self->buffer);    self->buffer = NULL;  }  return TRUE;}
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:27,


示例22: AudioOutputUnitStop

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


示例23: MacQTCloseVideoComponent

static void MacQTCloseVideoComponent(ComponentInstance ci){	OSStatus	err;	err = CloseComponent(ci);	CheckError(err, 11);}
开发者ID:alesegdia,项目名称:snes-sdk,代码行数:7,


示例24: MDIWndProc

/*	MDIWndProc*/LRESULT CALLBACK MDIWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){    HANDLE      hInfo;	PINFO       pInfo;	MSG			msg;	EventRecord	macEvent;	LONG		thePoints = GetMessagePos();	PAINTSTRUCT	ps;	msg.hwnd = hwnd;	msg.message = message;	msg.wParam = wParam;	msg.lParam = lParam;	msg.time = GetMessageTime();	msg.pt.x = LOWORD(thePoints);	msg.pt.y = HIWORD(thePoints);	WinEventToMacEvent(&msg, &macEvent);               switch (message)     {		case WM_CREATE:		case WM_MDICREATE:			break;		case WM_DESTROY:			hInfo = (HANDLE)GetWindowLong(hwnd, GWL_USERDATA);            if (hInfo)             {                if ((pInfo = (PINFO)LocalLock(hInfo)) != NULL){					if (pInfo->gi) 						// close the graphic import component						CloseComponent(pInfo->gi);						// Destroy our port association						DestroyPortAssociation((CGrafPort *)GetHWNDPort(pInfo->hwndChildWindow));				}                LocalUnlock(hInfo);			}			break;		// Draw our graphic		case WM_PAINT:			BeginPaint(hwnd, &ps); 			hInfo = (HANDLE)GetWindowLong(hwnd, GWL_USERDATA);            if (hInfo)             {                if ((pInfo = (PINFO)LocalLock(hInfo)) != NULL)					GraphicsImportDraw(pInfo->gi);			                LocalUnlock(hInfo);			}			EndPaint(hwnd, &ps);			break;        default:            return DefMDIChildProc(hwnd, message, wParam, lParam);    }    return DefMDIChildProc(hwnd, message, wParam, lParam);}
开发者ID:fruitsamples,项目名称:graphicimporter.win,代码行数:62,


示例25: EndMediaEdits

void MovieMaker::EndCapture(){	OSStatus	error = noErr;	if (movie && movieResRef)	{		if (media && track)		{			// Errors adding the frame aren't too important here.			(void)addFrame();						error = EndMediaEdits(media);			if (error == noErr)			{				error = SCCompressSequenceEnd(ci);			}			if (error == noErr)			{				error = InsertMediaIntoTrack(track, 0, 0, GetMediaDuration(media), fixed1);			}			media = NULL;			track = NULL;		}				short resId = movieInDataForkResID;		error = AddMovieResource(movie, movieResRef, &resId, "/pSecond Life");		CloseMovieFile(movieResRef);		movieResRef = 0;		movie = NULL;	}		// NOTE:  idh is disposed by SCCompressSequenceEnd.	idh = NULL;		if(ci)	{		CloseComponent(ci);		ci = NULL;	}		if(gworld)	{		DisposeGWorld(gworld);		gworld = NULL;	}	if(buffer)	{		free(buffer);		buffer = NULL;	}	if(invertedBuffer)	{		free(invertedBuffer);		invertedBuffer = NULL;	}}
开发者ID:xinyaojiejie,项目名称:Dale,代码行数:59,


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


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


示例28: qDestroyEncoderAPI

void qDestroyEncoderAPI(QEncoder* encoder){    // push out any remaining frames before releasing the compression session.    ICMCompressionSessionCompleteFrames(encoder->session, 1, 0, 0);    ICMCompressionSessionRelease(encoder->session);    CloseComponent(encoder->compressor);    free(encoder);}
开发者ID:mainakbiswas,项目名称:openqwaq,代码行数:9,


示例29: switch

void	SMACscom::SetInfo(SoundSource inSourceID, OSType inSelector, void* inData){    switch(inSelector)    {        case siCompressionParams:            {                //	process the the new params and produce an initialized                //	AudioCodec instance                ComponentInstance theEncoder = SetCompressionParams(inData);                ThrowIf(theEncoder == NULL, badFormat, "SMACscom::SetInfo: siCompressionParams didn't generate an encoder");                //	get rid of the input data                mSourceData = NULL;                mOutputData.desc.sampleCount = 0;                mOutputData.bufferSize = 0;                mOutputData.frameCount = 0;                mOutputData.commonFrameSize = 0;                //	close the old encoder if necessary                if((mEncoder != NULL) && (theEncoder != mEncoder))                {                    CloseComponent(mEncoder);                }                                //	use the new one                mEncoder = theEncoder;                                //	get the number of frames in 1 packet of data                UInt32 theSize = sizeof(UInt32);                ComponentResult theError = AudioCodecGetProperty(mEncoder, kAudioCodecPropertyPacketFrameSize, &theSize, &mPacketFrameSize);                ThrowIfError(theError, (CAException)theError, "SMACscom::SetInfo: siCompressionParams got an error from AudioCodecGetProperty while getting the packet frame size");                                //	get the maximum number of bytes in 1 packet of data                theSize = sizeof(UInt32);                theError = AudioCodecGetProperty(mEncoder, kAudioCodecPropertyMaximumPacketByteSize, &theSize, &mMaxPacketByteSize);                ThrowIfError(theError, (CAException)theError, "SMACscom::SetInfo: siCompressionParams got an error from AudioCodecGetProperty while getting the maximum packet byte size");                                //	toss the old output buffer                delete[] mOutputBuffer;                                //	allocate enough space for 1 packet of data, since that's                //	that's all this component will produce per call to GetSourceData                mOutputBuffer = new Byte[mMaxPacketByteSize];            }            break;                case siSourceIsExhausted:			// in this case it seems to be passed by value -- ugh!            mSourceIsExhausted = (Boolean)((UInt32)inData);            // Now pass this on, so no break!        default:            ThrowIf(mSourceComponent == NULL, siUnknownInfoType, "SMACscom::SetInfo: no source to pass request to")            ComponentResult theError = SoundComponentSetInfo(mSourceComponent, inSourceID, inSelector, inData);            ThrowIfError(theError, (CAException)theError, "SMACscom::SetInfo: got an error from SoundComponentSetInfo");            break;    };}
开发者ID:MaddTheSane,项目名称:a52codec,代码行数:57,



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


C++ CloseConnection函数代码示例
C++ CloseClipboard函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。