X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fauditioner.h;h=bdd04fcc66d72f02bb4df3f62d038af00a797968;hb=d592b2cc5b793cbe12433815df2f2b51f9454549;hp=424ede0009e8c955d1fd57f8924f8b2bf7c397f4;hpb=82232f06ba3eea4a2b4342ad91fab552f4044402;p=ardour.git diff --git a/libs/ardour/ardour/auditioner.h b/libs/ardour/ardour/auditioner.h index 424ede0009..bdd04fcc66 100644 --- a/libs/ardour/ardour/auditioner.h +++ b/libs/ardour/ardour/auditioner.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2001 Paul Davis + Copyright (C) 2001 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #ifndef __ardour_auditioner_h__ @@ -23,10 +22,10 @@ #include -#include +#include -#include -#include +#include "ardour/ardour.h" +#include "ardour/audio_track.h" namespace ARDOUR { @@ -40,31 +39,38 @@ class Auditioner : public AudioTrack Auditioner (Session&); ~Auditioner (); + int init (); + void audition_region (boost::shared_ptr); ARDOUR::AudioPlaylist& prepare_playlist (); - void audition_current_playlist (); - int play_audition (jack_nframes_t nframes); + int play_audition (framecnt_t nframes); + + MonitorState monitoring_state () const; - void cancel_audition () { - g_atomic_int_set (&_active, 0); + void cancel_audition () { + g_atomic_int_set (&_auditioning, 0); } - bool active() const { return g_atomic_int_get (&_active); } + bool auditioning() const { return g_atomic_int_get (&_auditioning); } + bool needs_monitor() const { return via_monitor; } + + virtual ChanCount input_streams () const; private: boost::shared_ptr the_region; - jack_nframes_t current_frame; - mutable gint _active; - Glib::Mutex lock; - jack_nframes_t length; + framepos_t current_frame; + mutable gint _auditioning; + Glib::Threads::Mutex lock; + framecnt_t length; + bool via_monitor; void drop_ports (); static void *_drop_ports (void *); void actually_drop_ports (); void output_changed (IOChange, void*); -}; +}; }; /* namespace ARDOUR */