// --------------------------------------------------------------------- FskErr FskNetCleanupNetworkEnumeration() { FskMutexAcquire(gNetworkInterfaceList->mutex); sDisposeInterfaceList((FskNetInterfaceRecord**)(void*)&gNetworkInterfaceList->list); FskListMutexDispose(gNetworkInterfaceList); gNetworkInterfaceList = NULL; return kFskErrNone; }
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; }
void FskNetInterfaceTerminate(void) { while (interfaceChangeCBList->list) FskNetInterfaceRemoveNotifier((FskNetInterfaceNotifier)interfaceChangeCBList->list); FskNetCleanupNetworkEnumeration(); #if TARGET_OS_WIN32 removeWindowsNetworkInterfaceChangeTracker(); #elif TARGET_OS_IPHONE removeIOSNetworkInterfaceChangeTracker(); #elif TARGET_OS_MAC removeMacNetworkInterfaceChangeTracker(); #endif #if TARGET_OS_KPL KplNetInterfaceTerminate(); #endif /* TARGET_OS_KPL */ FskListMutexDispose(interfaceChangeCBList); }