예제 #1
0
bool AISound::destroy()
{
    if (!initialized_)
    {
        return false;
    }

#ifdef BUILD_FOR_ARM

    ivTTS_Destroy(handle_);
    handle_ = 0;

    if ( resource_desc_.pCacheBlockIndex )
    {
        free(resource_desc_.pCacheBlockIndex);
    }
    if ( resource_desc_.pCacheBuffer )
    {
        free(resource_desc_.pCacheBuffer);
    }

    if ( heap_ )
    {
        delete [] heap_;
        heap_ = 0;
    }

    // Close the resource file.
    file_.close();

#endif

    initialized_ = false;
    return true;
}
예제 #2
0
Aisound::~Aisound()
{
	/* ÊÍ·ÅTTS ʵÀý*/
	ivTTS_Destroy(hTTS);

	if( NULL != tResPackDesc.pCacheBlockIndex )
	{
		free(tResPackDesc.pCacheBlockIndex);

		tResPackDesc.pCacheBlockIndex = NULL;
	}

	if( NULL != tResPackDesc.pCacheBuffer )
	{
		free(tResPackDesc.pCacheBuffer);

		tResPackDesc.pCacheBuffer = NULL;
	}

	if( NULL != tResPackDesc.pCBParam )
	{
		fclose((FILE*)tResPackDesc.pCBParam);

		tResPackDesc.pCBParam = NULL;
	}

	if ( NULL != pHeap )
	{
		free(pHeap);

		pHeap = NULL;
	}
}