Exemplo n.º 1
0
void linuxDigitalDispose(FskPinDigital pin)
{
    linuxDigital ld = (linuxDigital)pin;

    linuxDigitalRepeat(pin, NULL, NULL);

    if (ld->file >= 0)
        close(ld->file);

    FskListMutexRemove(gLinuxDigitalPins, &ld->next);
    FskMemPtrDispose(pin);
}
Exemplo n.º 2
0
void FskNetInterfaceRemoveNotifier(FskNetInterfaceNotifier callbackRef)
{
//	FskThread thread = FskThreadGetCurrent();

//	FskInstrumentedTypePrintfDebug(&gNetInterfaceNotifierTypeInstrumentation, "NetInterfaceNotifier REMOVE -- %x", callbackRef);
	if (NULL != callbackRef) {
		FskInstrumentedTypePrintfDebug(&gNetInterfaceNotifierTypeInstrumentation, "NetInterface REMOVE -- %x %s", callbackRef, callbackRef->name);
		FskListMutexRemove(interfaceChangeCBList, callbackRef);
		FskInstrumentedItemDispose(callbackRef);
		FskMemPtrDispose(callbackRef);
	}
//	FskInstrumentedTypePrintfDebug(&gNetInterfaceNotifierTypeInstrumentation, "NetInterface REMOVE -- %x done", callbackRef);
}
Exemplo n.º 3
0
FskErr androidAudioOutDispose(FskAudioOut audioOut) {
	androidAudioExt *ext;

	FskAudioNativePrintfVerbose("audioOutDispose %x", audioOut);
	if (audioOut == NULL)
		return kFskErrNone;
	ext = (androidAudioExt*)audioOut->ext;

	FskAudioNativePrintfVerbose("audioOutDispose ext is %x", ext);
	if (ext) {
		androidAudioOutStop(audioOut);
audioOut->ext = 0;

		FskListMutexRemove(audioOuts, audioOut);

		FskAudioNativePrintfDebug("removing audioOut->blocks list %x", audioOut->blocks);
		FskListMutexDispose(audioOut->blocks);
		FskMutexDispose(ext->getSamplePositionMutex);

		if (ext->playItf) {
			SLresult	res;
 			FskAudioNativePrintfDebug("before delete ext->playItf: %x", ext->playItf);
			res = (*ext->playItf)->SetPlayState(ext->playItf, SL_PLAYSTATE_STOPPED);
			CheckErr("audioOutDispose - set playstate STOPPED", res);
			res = (*ext->bufferQueueItf)->Clear(ext->bufferQueueItf);
			CheckErr("audioOutDispose - calling clear on bufferQueue", res);

 			FskAudioNativePrintfDebug("after delete ext->playItf: %x", ext->playItf);
 		}

		if (ext->audioBuf[0])
			FskMemPtrDispose(ext->audioBuf[0]);
		if (ext->audioBuf[1])
			FskMemPtrDispose(ext->audioBuf[1]);

		if (ext->player != NULL)
			(*ext->player)->Destroy(ext->player);
		if (ext->outputMixObject != NULL)
			(*ext->outputMixObject)->Destroy(ext->outputMixObject);

		FskMemPtrDispose(ext);
	}

	FskMemPtrDispose(audioOut);
	return kFskErrNone;
}
Exemplo n.º 4
0
FskErr KplDeviceNotifyPropertyChangedDispose(UInt32 propertyID, KplPropertyChangedCallback proc, void *refcon)
{
	FskErr err = kFskErrNone;
	KplPhoneNotifyRecord *kpn;
	
	FskListMutexAcquireMutex(gPhoneNotify);
	for (kpn = gPhoneNotify->list; NULL != kpn; kpn = (KplPhoneNotifyRecord*)kpn->next) {
		if (propertyID == kpn->propertyID && proc == kpn->proc) {
			break;
		}
	}
	FskListMutexReleaseMutex(gPhoneNotify);

	if (NULL != kpn) {
		FskListMutexRemove(gPhoneNotify, kpn);
		FskMemPtrDispose(kpn);
	}
		
	return err;
}