summaryrefslogtreecommitdiff
path: root/libs/ardour/auditioner.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-11-23 22:09:13 +0100
committerRobin Gareus <robin@gareus.org>2018-11-23 22:09:13 +0100
commit771ddcc86fee434ccb2d06b5e28bc9274264a8f8 (patch)
treef74f3e7114ec3e2191213a4c2d9d7f5a6fbb0a12 /libs/ardour/auditioner.cc
parent2e3e18320489c0da6e3172af4c6df6ca8d693c29 (diff)
NO-OP: whitespace and re-organization
Diffstat (limited to 'libs/ardour/auditioner.cc')
-rw-r--r--libs/ardour/auditioner.cc36
1 files changed, 35 insertions, 1 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index 7edc852549..cf070a8ca4 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -231,7 +231,6 @@ Auditioner::connect ()
return 0;
}
-
DataType
Auditioner::data_type () const {
if (_midi_audition) {
@@ -477,6 +476,41 @@ Auditioner::play_audition (samplecnt_t nframes)
}
void
+Auditioner::cancel_audition () {
+ g_atomic_int_set (&_auditioning, 0);
+}
+
+bool
+Auditioner::auditioning() const {
+ return g_atomic_int_get (&_auditioning);
+}
+
+void
+Auditioner::seek_to_sample (sampleoffset_t pos) {
+ if (_seek_sample < 0 && !_seeking) {
+ _seek_sample = pos;
+ }
+}
+
+void
+Auditioner::seek_to_percent (float const pos) {
+ if (_seek_sample < 0 && !_seeking) {
+ _seek_sample = floorf(length * pos / 100.0);
+ }
+}
+
+void
+Auditioner::seek_response (sampleoffset_t pos) {
+ /* called from the butler thread */
+ _seek_complete = true;
+ if (_seeking) {
+ current_sample = pos;
+ _seek_complete = true;
+ }
+}
+
+
+void
Auditioner::output_changed (IOChange change, void* /*src*/)
{
if (change.type & IOChange::ConnectionsChanged) {