예제 #1
0
projectM::~projectM()
{

 #ifdef USE_THREADS
  	printf("c");
	running = false;
	printf("l");
	pthread_cond_signal(&condition);
	printf("e");
	pthread_mutex_unlock( &mutex );
	printf("a");
	pthread_detach(thread);
	printf("n");
	pthread_cond_destroy(&condition);
	printf("u");
	pthread_mutex_destroy( &mutex );
	printf("p");
#endif
	destroyPresetTools();


	if ( renderer )
		delete ( renderer );
	if ( beatDetect )
		delete ( beatDetect );
	if ( _pcm ) {
		delete ( _pcm );
		_pcm = 0;
	}

	  
}
예제 #2
0
projectM::~projectM()
{
#ifdef USE_THREADS
    void *status;
    std::cout << "[projectM] thread ";
    printf("cl");
    worker_sync.finish_up();
    printf("e");
    pthread_join(thread, &status);
    printf("n");
    #ifdef SYNC_PRESET_SWITCHES
    pthread_mutex_destroy( &preset_mutex );
    #endif
    printf("up");
    std::cout << std::endl;
#endif
    destroyPresetTools();

    if ( renderer )
        delete ( renderer );
    if ( beatDetect )
        delete ( beatDetect );
    if ( _pcm ) {
        delete ( _pcm );
        _pcm = 0;
    }

    if(timeKeeper) {
        delete timeKeeper;
        timeKeeper = NULL;
    }

    delete(_pipelineContext);
    delete(_pipelineContext2);
}
예제 #3
0
파일: projectM.cpp 프로젝트: mrRay/projectm
projectM::~projectM()
{

    #ifdef USE_THREADS
    std::cout << "[projectM] thread ";
    printf("c");
    running = false;
    printf("l");
    pthread_cond_signal(&condition);
    printf("e");
    pthread_mutex_unlock( &mutex );
    printf("a");
    pthread_detach(thread);
    printf("n");
    pthread_cond_destroy(&condition);
    printf("u");
    pthread_mutex_destroy( &mutex );
    #ifdef SYNC_PRESET_SWITCHES
    pthread_mutex_destroy( &preset_mutex );
    #endif

    printf("p");
    std::cout << std::endl;
    #endif
    destroyPresetTools();

    if ( renderer )
        delete ( renderer );
    if ( beatDetect )
        delete ( beatDetect );
    if ( _pcm ) {
        delete ( _pcm );
        _pcm = 0;
    }

    delete(_pipelineContext);
    delete(_pipelineContext2);
}