correct PIBinaryLog play_speed 0
git-svn-id: svn://db.shs.com.ru/pip@122 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -148,12 +148,14 @@ bool PIBinaryLog::threadedRead(uchar *readed, int size) {
|
||||
if (delay > 0) {
|
||||
cdelay = delay * play_speed;
|
||||
dtc = int(cdelay) /100;
|
||||
if (play_speed <= 0.) dtc = 1;
|
||||
if (play_speed <= 0.) dtc = 2;
|
||||
//piCout << play_speed << dtc;
|
||||
for (int j=0; j<dtc; j++) {
|
||||
if (play_speed <= 0.) j--;
|
||||
cdelay = delay * play_speed;
|
||||
dtc = int(cdelay) /100;
|
||||
PISystemTime::fromMilliseconds(100).sleep();
|
||||
piMSleep(100);
|
||||
if (play_speed <= 0.) {dtc = 2; j = 0;}
|
||||
//piCout << " " << play_speed << dtc << j;
|
||||
}
|
||||
cdelay = cdelay - dtc*100;
|
||||
PISystemTime::fromMilliseconds(cdelay).sleep();
|
||||
@@ -544,7 +546,7 @@ void PIBinaryLog::propertyChanged(const PIString &) {
|
||||
rapid_start = property("rapidStart").toBool();
|
||||
play_mode = (PlayMode)property("playMode").toInt();
|
||||
double ps = property("playSpeed").toDouble();
|
||||
play_speed = ps > 0 ? 1. / ps : 0;
|
||||
play_speed = ps > 0. ? 1. / ps : 0.;
|
||||
play_delay = property("playDelay").toSystemTime();
|
||||
split_mode = (SplitMode)property("splitMode").toInt();
|
||||
split_time = property("splitTime").toSystemTime();
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
int defaultID() const {return default_id;}
|
||||
|
||||
//! Returns current play speed
|
||||
double playSpeed() const {return play_speed > 0 ? 1. / play_speed : 0;}
|
||||
double playSpeed() const {return play_speed > 0 ? 1. / play_speed : 0.;}
|
||||
|
||||
//! Returns current play delay
|
||||
PISystemTime playDelay() const {return play_delay;}
|
||||
|
||||
Reference in New Issue
Block a user