void projectM::projectM_reset() { this->mspf = 0; this->timed = 0; this->timestart = 0; this->count = 0; this->fpsstart = 0; projectM_resetengine(); }
void projectM::projectM_reset() { this->mspf = 0; this->timed = 0; this->timestart = 0; this->count = 0; this->fpsstart = 0; setlocale(LC_NUMERIC, "C"); projectM_resetengine(); }
void projectM::projectM_reset() { /** Default variable settings */ this->wvw = 512; this->wvh = 512; /** More other stuff */ this->mspf = 0; this->timed = 0; this->timestart = 0; this->count = 0; this->fpsstart = 0; projectM_resetengine(); }
int projectM::initPresetTools(int gx, int gy) { /* Set the seed to the current time in seconds */ srand ( time ( NULL ) ); std::string url = (m_flags & FLAG_DISABLE_PLAYLIST_LOAD) ? std::string() : settings().presetURL; if ( ( m_presetLoader = new PresetLoader ( gx, gy, url) ) == 0 ) { m_presetLoader = 0; std::cerr << "[projectM] error allocating preset loader" << std::endl; return PROJECTM_FAILURE; } if ( ( m_presetChooser = new PresetChooser ( *m_presetLoader, settings().softCutRatingsEnabled ) ) == 0 ) { delete ( m_presetLoader ); m_presetChooser = 0; m_presetLoader = 0; std::cerr << "[projectM] error allocating preset chooser" << std::endl; return PROJECTM_FAILURE; } // Start the iterator if (!m_presetPos) m_presetPos = new PresetIterator(); // Initialize a preset queue position as well // m_presetQueuePos = new PresetIterator(); // Start at end ptr- this allows next/previous to easily be done from this position. *m_presetPos = m_presetChooser->end(); // Load idle preset std::cerr << "[projectM] Allocating idle preset..." << std::endl; m_activePreset = m_presetLoader->loadPreset ("idle://Geiss & Sperl - Feedback (projectM idle HDR mix).milk"); renderer->SetPipeline(m_activePreset->pipeline()); // Case where no valid presets exist in directory. Could also mean // playlist initialization was deferred if (m_presetChooser->empty()) { //std::cerr << "[projectM] warning: no valid files found in preset directory \"" //<< m_presetLoader->directoryName() << "\"" << std::endl; } _matcher = new RenderItemMatcher(); _merger = new MasterRenderItemMerge(); //_merger->add(new WaveFormMergeFunction()); _merger->add(new ShapeMerge()); _merger->add(new BorderMerge()); //_merger->add(new BorderMergeFunction()); /// @bug These should be requested by the preset factories. _matcher->distanceFunction().addMetric(new ShapeXYDistance()); //std::cerr << "[projectM] Idle preset allocated." << std::endl; projectM_resetengine(); //std::cerr << "[projectM] engine has been reset." << std::endl; return PROJECTM_SUCCESS; }
int projectM::initPresetTools() { /* Initializes the builtin function database */ BuiltinFuncs::init_builtin_func_db(); /* Initializes all infix operators */ Eval::init_infix_ops(); /* Set the seed to the current time in seconds */ srand ( time ( NULL ) ); std::string url = (m_flags & FLAG_DISABLE_PLAYLIST_LOAD) ? std::string() : settings().presetURL; if ( ( m_presetLoader = new PresetLoader ( url) ) == 0 ) { m_presetLoader = 0; std::cerr << "[projectM] error allocating preset loader" << std::endl; return PROJECTM_FAILURE; } if ( ( m_presetChooser = new PresetChooser ( *m_presetLoader ) ) == 0 ) { delete ( m_presetLoader ); m_presetChooser = 0; m_presetLoader = 0; std::cerr << "[projectM] error allocating preset chooser" << std::endl; return PROJECTM_FAILURE; } // Start the iterator if (!m_presetPos) m_presetPos = new PresetIterator(); // Initialize a preset queue position as well // m_presetQueuePos = new PresetIterator(); // Start at end ptr- this allows next/previous to easily be done from this position. *m_presetPos = m_presetChooser->end(); // Load idle preset //std::cerr << "[projectM] Allocating idle preset..." << std::endl; if (m_presetChooser->empty()) m_activePreset = IdlePreset::allocate ( presetInputs, presetOutputs ); else switchPreset(m_activePreset, presetInputs, presetOutputs); // Case where no valid presets exist in directory. Could also mean // playlist initialization was deferred //if ( m_presetChooser->empty() ) //{ //std::cerr << "[projectM] warning: no valid files found in preset directory \"" //<< m_presetLoader->directoryName() << "\"" << std::endl; //} //std::cerr << "[projectM] Idle preset allocated." << std::endl; projectM_resetengine(); //std::cerr << "[projectM] engine has been reset." << std::endl; return PROJECTM_SUCCESS; }