2 Copyright (C) 2010 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_public_diskstream_h__
21 #define __ardour_public_diskstream_h__
29 /** Public interface to a Diskstream */
30 class PublicDiskstream
34 virtual boost::shared_ptr
<Playlist
> playlist () = 0;
35 virtual void monitor_input (bool) = 0;
36 virtual bool destructive () const = 0;
37 virtual std::list
<boost::shared_ptr
<Source
> > & last_capture_sources () = 0;
38 virtual void set_capture_offset () = 0;
39 virtual std::list
<boost::shared_ptr
<Source
> > steal_write_sources () = 0;
40 virtual void reset_write_sources (bool, bool force
= false) = 0;
41 virtual float playback_buffer_load () const = 0;
42 virtual float capture_buffer_load () const = 0;
43 virtual int do_refill () = 0;
44 virtual int do_flush (RunContext
, bool force
= false) = 0;
45 virtual uint32_t read_data_count() const = 0;
46 virtual uint32_t write_data_count() const = 0;
47 virtual void set_pending_overwrite (bool) = 0;
48 virtual int seek (nframes_t
, bool complete_refill
= false) = 0;
49 virtual bool hidden () const = 0;
50 virtual int can_internal_playback_seek (nframes_t
) = 0;
51 virtual int internal_playback_seek (nframes_t
) = 0;
52 virtual void non_realtime_input_change () = 0;
53 virtual void non_realtime_locate (nframes_t
) = 0;
54 virtual void non_realtime_set_speed () = 0;
55 virtual int overwrite_existing_buffers () = 0;
56 virtual nframes_t
get_captured_frames (uint32_t n
= 0) = 0;
57 virtual int set_loop (Location
*) = 0;
58 virtual void transport_looped (nframes_t
) = 0;
59 virtual bool realtime_set_speed (double, bool) = 0;
60 virtual void transport_stopped_wallclock (struct tm
&, time_t, bool) = 0;
61 virtual bool pending_overwrite () const = 0;
62 virtual double speed () const = 0;
63 virtual void prepare_to_stop (framepos_t
) = 0;
64 virtual void set_slaved (bool) = 0;
65 virtual ChanCount
n_channels () = 0;
66 virtual nframes_t
get_capture_start_frame (uint32_t n
= 0) = 0;
67 virtual AlignStyle
alignment_style () const = 0;
68 virtual void set_record_enabled (bool) = 0;
69 virtual nframes_t
current_capture_start () const = 0;
70 virtual nframes_t
current_capture_end () const = 0;
71 virtual void playlist_modified () = 0;
72 virtual int use_playlist (boost::shared_ptr
<Playlist
>) = 0;
73 virtual void set_align_style (AlignStyle
) = 0;
74 virtual int use_copy_playlist () = 0;
75 virtual int use_new_playlist () = 0;
76 virtual void adjust_playback_buffering () = 0;
77 virtual void adjust_capture_buffering () = 0;