void EngineControl::init(unsigned int samplerate_, unsigned int buffersize_, int policy_, int priority_) { if (policy_ != policy || priority_ != priority) { policy = policy_; priority = priority_; set_buffersize(buffersize_); set_samplerate(samplerate_); return; } if (buffersize_ != buffersize) { set_buffersize(buffersize_); } if (samplerate_ != samplerate) { set_samplerate(samplerate_); } }
void ksymp_set_buffersize(KSYMediaPlayer *mp, int size) { assert(mp); pthread_mutex_lock(&mp->mutex); set_buffersize(mp->ffplayer, size); pthread_mutex_unlock(&mp->mutex); }