mp_sint32 PlayerBase::resumePlaying(bool unpause/* = true*/) { if (paused && unpause) { paused = false; return resume(); } if (module) { // if the player hasn't been initialized until now => DO IT if (!isInitialized()) { mp_sint32 err = initDevice(); if (err!=0) { return err; } } startMixer(); startPlay = true; } return 0; }
mp_sint32 PlayerBase::kick() { // if the player hasn't been initialized until now => DO IT if (!isInitialized()) { mp_sint32 err = initDevice(); if (err != MP_OK) { return err; } } // - configure player: -------------- // playing => song is not paused yet paused = false; // playing => song has not stopped yet halted = false; // set idle mode setIdle(idle); // - configure mixer: --------------- // mixer reset resetChannelsWithoutMuting(); // start playing (mixer flag) startPlay = true; // mix buffers startMixer(); // reset sample counters sampleCounter = 0; return MP_OK; }
mp_sint32 PlayerBase::kick() { // if the player hasn't been initialized until now => DO IT if (!isInitialized()) { mp_sint32 err = initDevice(); if (err!=0) { return err; } } // - configure player: -------------- // playing => song is not paused yet paused = false; // playing => song has not stopped yet halted = false; // repeat mode this->repeat = repeat; // set idle mode setIdle(idle); // - configure mixer: --------------- // mixer reset resetChannelsWithoutMuting(); // start playing (mixer flag) startPlay = true; // mix buffers startMixer(); //SetThreadPriority(hThread,THREAD_PRIORITY_NORMAL); // reset sample counters sampleCounter = 0; return 0; }