summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaromil <jaromil@949728d9-16ea-0310-a75c-cbdf8430a4b8>2006-12-18 16:55:51 (GMT)
committer jaromil <jaromil@949728d9-16ea-0310-a75c-cbdf8430a4b8>2006-12-18 16:55:51 (GMT)
commit928dbeb341f13e4b6da716c3b2eb45e3857588f0 (patch)
tree8764232badf5860439d50604ef757753996951aa
parentc497b229ba8020e6e20c2162a0626a1d08110535 (diff)
responsive seek after button press
git-svn-id: svn://dyne.org/montevideo/ivysync@83 949728d9-16ea-0310-a75c-cbdf8430a4b8
-rw-r--r--branches/lydia/cmdline.cpp30
-rw-r--r--branches/lydia/parport.cpp2
2 files changed, 30 insertions, 2 deletions
diff --git a/branches/lydia/cmdline.cpp b/branches/lydia/cmdline.cpp
index 1a238f1..c155cb1 100644
--- a/branches/lydia/cmdline.cpp
+++ b/branches/lydia/cmdline.cpp
@@ -465,11 +465,37 @@ int main(int argc, char **argv) {
if(useaudio) sndfile->replay = true;
do {
+
jsleep(0, interval);
+
+ if( parport->button_is_pressed() ) {
+
+ parport->light(false);
+
+ D("seek to offset %u", minidrama[c]->black);
+ /// global seek of all channels
+ dec = (Decoder*) decoders.begin();
+ syncer = false;
+ while(dec) {
+
+ dec->stop();
+ dec->setup(&syncer, 0);
+ dec->setoffset( minidrama[c]->black );
+ dec->play();
+ dec = (Decoder*) dec->next;
+
+ }
+
+ jsleep(0, interval);
+ syncer = true;
+ break;
+
+ }
+
off = dec->getoffset();
+
} while(off < minidrama[c]->black);
- A("end of fog at minidrama %u",c);
parport->light(false);
// fog end: check button and skip if not pressed
@@ -493,6 +519,8 @@ int main(int argc, char **argv) {
A("button was pressed: showing minidrama %u",c);
}
+ parport->button_reset();
+
}
//////////////////////////////////////
diff --git a/branches/lydia/parport.cpp b/branches/lydia/parport.cpp
index 42c0ba4..bef8334 100644
--- a/branches/lydia/parport.cpp
+++ b/branches/lydia/parport.cpp
@@ -72,7 +72,7 @@ void ParPort::run() {
// Read from the status port (BASE+2)
status = inb(BASEPORT + 1);
- if( status == 120 )
+ if( status == 88 )
button_state = true;
}