summaryrefslogtreecommitdiff
path: root/gtk2_ardour/strip_silence_dialog.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-03-04 13:15:04 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-03-04 13:15:04 +0000
commit6dde6c5a8fc0630d625f4b73e253ed7e7a48c03a (patch)
tree17160bb08ad26459194490e420e2a15f94e6d4c8 /gtk2_ardour/strip_silence_dialog.cc
parentc2c224727eee4c16bd64ca4a5b5bb2d276f5afe3 (diff)
goodbye to MementoCommand for playlists
git-svn-id: svn://localhost/ardour2/branches/3.0@6726 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/strip_silence_dialog.cc')
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc17
1 files changed, 2 insertions, 15 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index 56210c9373..4dd8f225f2 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -270,7 +270,7 @@ StripSilenceDialog::_detection_done (void* arg)
bool
StripSilenceDialog::detection_done ()
{
- get_window()->set_cursor (Gdk::Cursor (Gdk::LEFT_PTR));
+ // get_window()->set_cursor (Gdk::Cursor (Gdk::LEFT_PTR));
update_silence_rects ();
return false;
}
@@ -287,22 +287,15 @@ StripSilenceDialog::detection_thread_work ()
{
ARDOUR_UI::instance()->register_thread ("gui", pthread_self(), "silence", 32);
- cerr << pthread_self() << ": thread exists\n";
-
while (1) {
run_lock.lock ();
- cerr << pthread_self() << ": thread notes that its waiting\n";
thread_waiting->signal ();
- cerr << pthread_self() << ": thread waits to run\n";
thread_run->wait (run_lock);
- cerr << pthread_self() << ": silence thread active\n";
-
if (thread_should_exit) {
thread_waiting->signal ();
run_lock.unlock ();
- cerr << pthread_self() << ": silence thread exited\n";
break;
}
@@ -319,7 +312,6 @@ StripSilenceDialog::detection_thread_work ()
}
}
- cerr << pthread_self() << ": silence iteration done\n";
}
return 0;
@@ -349,9 +341,7 @@ StripSilenceDialog::start_silence_detection ()
pthread_create (&itt.thread, 0, StripSilenceDialog::_detection_thread_work, this);
/* wait for it to get started */
- cerr << "Wait for new thread to be ready\n";
thread_waiting->wait (run_lock);
- cerr << "\tits ready\n";
} else {
@@ -361,11 +351,8 @@ StripSilenceDialog::start_silence_detection ()
current = 0;
while (!itt.done) {
- cerr << "tell existing thread to stop\n";
thread_run->signal ();
- cerr << "wait for existing thread to stop\n";
thread_waiting->wait (run_lock);
- cerr << "its stopped\n";
}
}
@@ -377,7 +364,6 @@ StripSilenceDialog::start_silence_detection ()
/* and start it up (again) */
- cerr << "signal thread to run again\n";
thread_run->signal ();
/* change cursor */
@@ -398,4 +384,5 @@ StripSilenceDialog::stop_thread ()
thread_should_exit = true;
thread_run->signal ();
thread_waiting->wait (run_lock);
+ itt.thread = 0;
}