46 #include "ardour/debug.h"
55 #include "ardour/utils.h"
64 size_t AudioDiskstream::_working_buffers_size = 0;
65 Sample* AudioDiskstream::_mixdown_buffer = 0;
66 gain_t* AudioDiskstream::_gain_buffer = 0;
70 , channels (new ChannelList)
79 use_destructive_playlist ();
122 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
153 bool need_write_sources =
false;
163 if (!cr->empty() && !cr->front()->write_source) {
164 need_write_sources =
true;
179 need_write_sources =
true;
193 if (need_write_sources) {
224 ChannelList::iterator chan;
226 vector<string> connections;
228 for (n = 0, chan = c->begin(); chan != c->end() && n < ni; ++chan, ++n) {
230 connections.clear ();
232 if ((
_io->
nth (n).get()) && (
_io->
nth (n)->get_connections (connections) == 0)) {
233 if (!(*chan)->source.name.empty()) {
236 (*chan)->source.name = string();
238 (*chan)->source.name = connections[0];
248 if ((playlist = boost::dynamic_pointer_cast<AudioPlaylist> (
_session.
playlists->by_name (name))) == 0) {
263 assert(boost::dynamic_pointer_cast<AudioPlaylist>(playlist));
327 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
328 srcs.push_back ((*chan)->write_source);
333 assert (!srcs.empty ());
360 assert((rl.size() == 1));
381 ChannelList::iterator chan;
384 for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
386 assert((*chan)->write_source);
387 (*chan)->write_source->set_allow_remove_if_empty (
false);
391 (*chan)->write_source->set_destructive (
true);
402 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
407 if (transitions.len[0] > 0) {
410 (*chan)->capture_transition_buf->increment_write_ptr(1);
413 fatal <<
X_(
"programming error: capture_transition_buf is full on rec start! inconceivable!")
434 ChannelList::iterator chan;
437 bool collect_playback =
false;
440 playback_distance = 0;
460 for (chan = c->begin(); chan != c->end(); ++chan) {
461 (*chan)->current_capture_buffer = 0;
462 (*chan)->current_playback_buffer = 0;
502 for (n = 0, chan = c->begin(); chan != c->end() && n < limit; ++chan, ++n) {
527 if (rec_nframes > total) {
561 if (rec_nframes == nframes && rec_offset == 0) {
563 for (chan = c->begin(); chan != c->end(); ++chan) {
564 (*chan)->current_playback_buffer = (*chan)->current_capture_buffer;
567 playback_distance = nframes;
577 collect_playback =
true;
586 for (chan = c->begin(); chan != c->end(); ++chan) {
587 (*chan)->current_playback_buffer = (*chan)->current_capture_buffer;
590 playback_distance = nframes;
594 collect_playback =
true;
608 necessary_samples = nframes;
611 for (chan = c->begin(); chan != c->end(); ++chan) {
612 (*chan)->playback_buf->get_read_vector (&(*chan)->playback_vector);
622 for (chan = c->begin(); chan != c->end(); ++chan, ++n) {
633 if (necessary_samples > total) {
634 cerr <<
_name <<
" Need " << necessary_samples <<
" total = " << total << endl;
635 cerr <<
"underrun for " <<
_name << endl;
671 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++channel) {
681 playback_distance = nframes;
687 if (need_disk_signal) {
692 size_t n_chans = c->size();
695 if (n_chans > n_buffers) {
696 scaling = ((float) n_buffers)/n_chans;
699 for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
705 if (scaling != 1.0
f) {
706 buf.read_from_with_gain (chaninfo->current_playback_buffer, nframes, scaling);
708 buf.read_from (chaninfo->current_playback_buffer, nframes);
711 if (scaling != 1.0
f) {
712 buf.accumulate_with_gain_from (chaninfo->current_playback_buffer, nframes, scaling);
714 buf.accumulate_from (chaninfo->current_playback_buffer, nframes);
736 playback_distance = nframes;
741 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++channel) {
745 playback_distance = nframes;
749 return -playback_distance;
751 return playback_distance;
762 bool need_butler =
false;
775 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
777 (*chan)->playback_buf->increment_read_ptr (playback_distance);
795 need_butler = c->front()->playback_buf->write_space() >= c->front()->playback_buf->bufsize() / 2;
843 framecnt_t size = c->front()->playback_buf->bufsize();
845 mixdown_buffer =
new Sample[size];
846 gain_buffer =
new float[size];
856 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan, ++n) {
875 error <<
string_compose(
_(
"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"),
884 if (
read ((*chan)->playback_buf->buffer(), mixdown_buffer, gain_buffer,
start, cnt, n,
reversed)) {
885 error <<
string_compose(
_(
"AudioDiskstream %1: when refilling, cannot read %2 from playlist at frame %3"),
896 delete [] gain_buffer;
897 delete [] mixdown_buffer;
906 ChannelList::iterator chan;
911 for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
912 (*chan)->playback_buf->reset ();
913 (*chan)->capture_buf->reset ();
925 if (complete_refill) {
937 ChannelList::iterator chan;
940 for (chan = c->begin(); chan != c->end(); ++chan) {
941 if ((*chan)->playback_buf->read_space() < (size_t) distance) {
951 ChannelList::iterator chan;
954 for (chan = c->begin(); chan != c->end(); ++chan) {
955 (*chan)->playback_buf->increment_read_ptr (llabs(distance));
976 int channel,
bool reversed)
1000 loop_start = loc->
start();
1001 loop_end = loc->
end();
1002 loop_length = loop_end - loop_start;
1009 if (loc && start >= loop_end) {
1010 start = loop_start + ((start - loop_start) % loop_length);
1027 if (loc && (loop_end - start < cnt)) {
1028 this_read = loop_end -
start;
1035 if (this_read == 0) {
1039 this_read = min(cnt,this_read);
1041 if (
audio_playlist()->
read (buf+offset, mixdown_buffer, gain_buffer, start, this_read, channel) != this_read) {
1042 error <<
string_compose(
_(
"AudioDiskstream %1: cannot read %2 from playlist at frame %3"),
id(), this_read,
1063 offset += this_read;
1096 ChannelList::iterator i;
1104 assert(mixdown_buffer);
1105 assert(gain_buffer);
1112 c->front()->playback_buf->get_write_vector (&vector);
1114 if ((total_space = vector.len[0] + vector.len[1]) == 0) {
1139 if ((total_space < disk_read_chunk_frames) && fabs (
_actual_speed) < 2.0
f) {
1148 if (
_slaved && total_space < (
framecnt_t) (c->front()->playback_buf->bufsize() / 2)) {
1154 total_space = min (disk_read_chunk_frames, total_space);
1162 for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) {
1166 memset (vector.
buf[0], 0,
sizeof(
Sample) * vector.len[0]);
1167 if (vector.len[1]) {
1168 memset (vector.
buf[1], 0,
sizeof(
Sample) * vector.len[1]);
1195 for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) {
1199 memset (vector.
buf[0], 0,
sizeof(
Sample) * vector.len[0]);
1200 if (vector.len[1]) {
1201 memset (vector.
buf[1], 0,
sizeof(
Sample) * vector.len[1]);
1222 for (chan_n = 0, i = c->begin(); i != c->end(); ++i, ++chan_n) {
1231 if ((
framecnt_t) vector.len[0] > disk_read_chunk_frames) {
1257 buf1 = vector.
buf[0];
1258 len1 = vector.len[0];
1259 buf2 = vector.
buf[1];
1260 len2 = vector.len[1];
1262 to_read = min (ts, len1);
1263 to_read = min (to_read, disk_read_chunk_frames);
1265 assert (to_read >= 0);
1269 if (
read (buf1, mixdown_buffer, gain_buffer, file_frame_tmp, to_read, chan_n, reversed)) {
1278 to_read = min (ts, len2);
1286 if (
read (buf2, mixdown_buffer, gain_buffer, file_frame_tmp, to_read, chan_n, reversed)) {
1327 transvec.
buf[0] = 0;
1328 transvec.
buf[1] = 0;
1333 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1335 (*chan)->capture_buf->get_read_vector (&vector);
1337 total = vector.len[0] + vector.len[1];
1364 (*chan)->capture_transition_buf->get_read_vector(&transvec);
1365 size_t transcount = transvec.len[0] + transvec.len[1];
1368 for (ti=0; ti < transcount; ++ti) {
1369 CaptureTransition & captrans = (ti < transvec.len[0]) ? transvec.
buf[0][ti] : transvec.
buf[1][ti-transvec.len[0]];
1374 (*chan)->write_source->mark_capture_start (captrans.
capture_val);
1375 (*chan)->curr_capture_cnt = 0;
1381 if (captrans.
capture_val <= (*chan)->curr_capture_cnt + to_write) {
1384 uint32_t nto_write = (captrans.
capture_val - (*chan)->curr_capture_cnt);
1386 if (nto_write < to_write) {
1389 to_write = nto_write;
1391 (*chan)->write_source->mark_capture_end ();
1406 (*chan)->capture_transition_buf->increment_read_ptr(ti);
1410 if ((!(*chan)->write_source) || (*chan)->write_source->write (vector.
buf[0], to_write) != to_write) {
1415 (*chan)->capture_buf->increment_read_ptr (to_write);
1416 (*chan)->curr_capture_cnt += to_write;
1429 if ((*chan)->write_source->write (vector.
buf[1], to_write) != to_write) {
1434 (*chan)->capture_buf->increment_read_ptr (to_write);
1435 (*chan)->curr_capture_cnt += to_write;
1446 uint32_t buffer_position;
1447 bool more_work =
true;
1452 SourceList::iterator src;
1453 ChannelList::iterator chan;
1454 vector<CaptureInfo*>::iterator ci;
1457 bool mark_write_completed =
false;
1465 while (more_work && !err) {
1485 if (abort_capture) {
1491 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1493 if ((*chan)->write_source) {
1495 (*chan)->write_source->mark_for_remove ();
1496 (*chan)->write_source->drop_references ();
1497 (*chan)->write_source.reset ();
1507 total_capture += (*ci)->frames;
1512 for (n = 0, chan = c->begin(); chan != c->end(); ++chan, ++n) {
1522 if (
Config->get_auto_analyse_audio()) {
1542 string whole_file_region_name;
1577 for (buffer_position = c->front()->write_source->last_capture_start_frame(), ci =
capture_info.begin(); ci !=
capture_info.end(); ++ci) {
1584 _name, (*ci)->start, (*ci)->frames, region_name));
1599 error <<
_(
"AudioDiskstream: could not create region for captured audio!") <<
endmsg;
1609 buffer_position += (*ci)->frames;
1617 mark_write_completed =
true;
1662 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1667 if (transvec.len[0] > 0) {
1670 (*chan)->capture_transition_buf->increment_write_ptr(1);
1674 fatal <<
X_(
"programming error: capture_transition_buf is full on rec loop! inconceivable!")
1695 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1700 if (transvec.len[0] > 0) {
1703 (*chan)->capture_transition_buf->increment_write_ptr(1);
1707 fatal <<
string_compose (
_(
"programmer error: %1"),
X_(
"capture_transition_buf is full when stopping record! inconceivable!")) <<
endmsg;
1784 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1785 (*chan)->source.request_input_monitoring (!(
_session.
config.get_auto_input() && rolling));
1788 (*chan)->write_source->mark_streaming_write_started (lock);
1792 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1795 (*chan)->write_source->mark_streaming_write_started (lock);
1807 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
1808 (*chan)->source.request_input_monitoring (
false);
1824 snprintf (buf,
sizeof(buf),
"%u", (
unsigned int) c->size());
1833 cs_grandchild =
new XMLNode (
X_(
"file"));
1843 snprintf (buf,
sizeof (buf),
"%" PRId64, pi->
start());
1861 uint32_t nchans = 1;
1862 XMLNode* capture_pending_node = 0;
1869 for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
1874 if ((*niter)->name() ==
X_(
"CapturingSources")) {
1875 capture_pending_node = *niter;
1883 if ((prop = node.
property (
"channels")) != 0) {
1934 if (n >= c->size()) {
1964 ChannelList::iterator chan;
1974 for (chan = c->begin(), n = 0; chan != c->end(); ++chan, ++n) {
1978 if ((*chan)->write_source) {
1980 if (mark_write_complete) {
1982 (*chan)->write_source->mark_streaming_write_completed (lock);
1983 (*chan)->write_source->done_with_peakfile_writes ();
1986 if ((*chan)->write_source->removable()) {
1987 (*chan)->write_source->mark_for_remove ();
1988 (*chan)->write_source->drop_references ();
1991 (*chan)->write_source.reset ();
2002 if ((*chan)->write_source == 0) {
2027 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
2028 if ((*chan)->speed_buffer)
2029 delete [] (*chan)->speed_buffer;
2051 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
2052 if ((*chan)->playback_wrap_buffer) {
2053 delete [] (*chan)->playback_wrap_buffer;
2055 (*chan)->playback_wrap_buffer =
new Sample[required_wrap_size];
2056 if ((*chan)->capture_wrap_buffer) {
2057 delete [] (*chan)->capture_wrap_buffer;
2059 (*chan)->capture_wrap_buffer =
new Sample[required_wrap_size];
2071 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
2072 (*chan)->source.request_input_monitoring (yn);
2079 bool have_physical =
false;
2093 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
2094 if ((*chan)->source.is_physical ()) {
2095 have_physical =
true;
2100 if (have_physical) {
2110 while (how_many--) {
2137 while (how_many-- && !c->empty()) {
2166 return (
float) ((double) c->front()->playback_buf->read_space()/
2167 (double) c->front()->playback_buf->bufsize());
2179 return (
float) ((double) c->front()->capture_buf->write_space()/
2180 (double) c->front()->capture_buf->bufsize());
2194 if ((prop = node.
property (
X_(
"at"))) == 0) {
2198 if (sscanf (prop->
value().c_str(),
"%" PRIu64, &
position) != 1) {
2202 for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
2203 if ((*niter)->name() ==
X_(
"file")) {
2205 if ((prop = (*niter)->property (
X_(
"path"))) == 0) {
2211 if (stat (prop->
value().c_str(), &sbuf)) {
2234 pending_sources.push_back (fs);
2236 if (first_fs == 0) {
2244 if (pending_sources.size() == 0) {
2284 _(
"%1: cannot create whole-file region from pending capture sources"),
2315 bool bounce_ignored;
2337 requires_bounce =
false;
2344 requires_bounce =
false;
2351 requires_bounce =
true;
2358 assert((rl.size() == 1));
2364 requires_bounce =
false;
2373 requires_bounce =
true;
2385 requires_bounce =
true;
2396 requires_bounce =
true;
2400 requires_bounce =
false;
2409 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
2419 for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
2446 current_capture_buffer = 0;
2447 current_playback_buffer = 0;
2448 curr_capture_cnt = 0;
2450 speed_buffer =
new Sample[speed_size];
2451 playback_wrap_buffer =
new Sample[wrap_size];
2452 capture_wrap_buffer =
new Sample[wrap_size];
2464 memset (playback_buf->buffer(), 0,
sizeof (
Sample) * playback_buf->bufsize());
2472 delete playback_buf;
2474 memset (playback_buf->buffer(), 0,
sizeof (
Sample) * playback_buf->bufsize());
2483 memset (capture_buf->buffer(), 0,
sizeof (
Sample) * capture_buf->bufsize());
2508 delete [] speed_buffer;
2511 delete [] playback_wrap_buffer;
2512 playback_wrap_buffer = 0;
2514 delete [] capture_wrap_buffer;
2515 capture_wrap_buffer = 0;
2517 delete playback_buf;
2523 delete capture_transition_buf;
2524 capture_transition_buf = 0;
2531 if (
_name == name) {
2539 ChannelList::iterator i;
2542 for (n = 0, i = c->begin(); i != c->end(); ++i, ++n) {
2561 ChannelList::iterator i;
2564 for (n = 0, i = c->begin(); i != c->end(); ++i, ++n) {
framepos_t first_recordable_frame
framecnt_t _capture_offset
void adjust_playback_buffering()
int set_non_layered(bool yn)
XMLNodeList::iterator XMLNodeIterator
ARDOUR::Session & _session
int internal_playback_seek(framecnt_t distance)
LIBPBD_API Transmitter fatal
int overwrite_existing_buffers()
void calculate_record_range(Evoral::OverlapType ot, framepos_t transport_frame, framecnt_t nframes, framecnt_t &rec_nframes, framecnt_t &rec_offset)
Sample * playback_wrap_buffer
static int region_name(std::string &, std::string, bool new_level=false)
int atoi(const string &s)
boost::shared_ptr< Playlist > _playlist
framecnt_t audio_diskstream_capture_buffer_size() const
int do_refill_with_alloc()
#define DEBUG_THREAD_SELF
AudioBuffer & get_audio_buffer(pframes_t nframes)
const std::string & value() const
bool get_record_enabled() const
int read(Sample *buf, Sample *mixdown_buffer, float *gain_buffer, framepos_t &start, framecnt_t cnt, int channel, bool reversed)
void allocate_temporary_buffers()
Glib::Threads::Mutex::Lock Lock
double transport_speed() const
boost::shared_ptr< AudioFileSource > create_audio_source_for_session(size_t, std::string const &, uint32_t, bool destructive)
LIBARDOUR_API uint64_t Destruction
PBD::Signal0< void > RecordEnableChanged
int remove_channel(uint32_t how_many)
void set_count(const ChanCount &count)
virtual bool set_name(const std::string &str)
void disengage_record_enable()
virtual void set_capture_offset()
bool actively_recording() const
std::list< boost::shared_ptr< Source > > _last_capture_sources
void special_set_position(framepos_t)
PBD::RingBufferNPT< Sample > * capture_buf
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
static PBD::Signal0< void > DiskUnderrun
LIBARDOUR_API PBD::PropertyDescriptor< std::string > name
framecnt_t wrap_buffer_size
void set_layer(boost::shared_ptr< Region >, double)
static Sample * _mixdown_buffer
uint32_t i_am_the_modifier
int set_state(const XMLNode &node, int version)
void add_command(Command *const cmd)
int add_channel_to(boost::shared_ptr< ChannelList >, uint32_t how_many)
void set_speed(double new_speed)
int add_channel(uint32_t how_many)
bool port_is_physical(const std::string &) const
framepos_t last_recordable_frame
LIBPBD_API Transmitter error
void setup_destructive_playlist()
const XMLNodeList & children(const std::string &str=std::string()) const
LIBARDOUR_API uint64_t CaptureAlignment
std::ostream & endmsg(std::ostream &ostr)
void request_input_monitoring(const std::string &, bool) const
SessionConfiguration config
AlignChoice _alignment_choice
boost::shared_ptr< Source > source(uint32_t n=0) const
virtual void check_record_status(framepos_t transport_frame, bool can_record)
static size_t _working_buffers_size
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
framepos_t capture_val
The start or end file frame position.
frameoffset_t calculate_playback_distance(pframes_t nframes)
static AudioEngine * instance()
AudioBuffer & get_audio(size_t i)
virtual bool set_write_source_name(const std::string &str)
PBD::RingBufferNPT< Sample >::rw_vector capture_vector
int _do_refill(Sample *mixdown_buffer, float *gain_buffer)
int process(BufferSet &, framepos_t transport_frame, pframes_t nframes, framecnt_t &, bool need_disk_signal)
std::string _write_source_name
float playback_buffer_load() const
void thaw(bool from_undo=false)
framecnt_t audio_diskstream_playback_buffer_size() const
AudioDiskstream(Session &, const std::string &name, Diskstream::Flag f=Recordable)
void finish_capture(boost::shared_ptr< ChannelList >)
boost::shared_ptr< AudioPort > audio(uint32_t n) const
std::list< XMLNode * > XMLNodeList
int use_playlist(boost::shared_ptr< Playlist >)
void set_record_enabled(bool yn)
void add_channel_to(int, int)
Sample * current_playback_buffer
boost::shared_ptr< AudioFileSource > write_source(uint32_t n=0)
std::vector< boost::shared_ptr< AudioFileSource > > capturing_sources
CubicInterpolation interpolation
static framecnt_t disk_write_chunk_frames
bool set_name(std::string const &)
void non_realtime_input_change()
IOChange input_change_pending
void add_region(boost::shared_ptr< Region >, framepos_t position, float times=1, bool auto_partition=false)
PBD::RingBufferNPT< Sample > * playback_buf
const ChanCount & n_ports() const
LIBARDOUR_API uint64_t Butler
Glib::Threads::Mutex state_lock
void prepare_record_status(framepos_t capture_start_frame)
ChannelInfo(framecnt_t playback_buffer_size, framecnt_t capture_buffer_size, framecnt_t speed_buffer_size, framecnt_t wrap_buffer_size)
void engage_record_enable()
PBD::Signal0< void > LayeringChanged
Sample * capture_wrap_buffer
XMLProperty * property(const char *)
boost::shared_ptr< ARDOUR::IO > _io
LIBARDOUR_API RCConfiguration * Config
std::vector< CaptureInfo * > capture_info
enum ARDOUR::IOChange::Type type
void remove_channel_from()
static std::string bump_name(std::string old_name, Session &)
bool prep_record_enable()
static void queue_source_for_analysis(boost::shared_ptr< Source >, bool force)
framepos_t transport_frame() const
static void free_working_buffers()
float capture_buffer_load() const
framecnt_t adjust_capture_position
static framecnt_t disk_read_chunk_frames
void resize_playback(framecnt_t)
int remove_channel_from(boost::shared_ptr< ChannelList >, uint32_t how_many)
static PBD::Signal1< void, ChanCount > PortCountChanged
std::vector< ChannelInfo * > ChannelList
boost::shared_ptr< T > get_copy() const
bool record_enabled() const
framecnt_t worst_output_latency() const
#define DEBUG_TRACE(bits, str)
int seek(framepos_t which_sample, bool complete_refill=false)
int use_pending_capture_data(XMLNode &node)
virtual int set_state(const XMLNode &, int version)
static int loading_state_version
PBD::Property< std::string > _name
XMLNode & get_state(void)
void resize_capture(framecnt_t)
framepos_t capture_start_frame
void set_whole_file(bool yn)
void request_input_monitoring(bool)
std::list< boost::shared_ptr< Region > > RegionList
framepos_t position() const
SerializedRCUManager< ChannelList > channels
void set_pending_overwrite(bool)
int find_and_use_playlist(const std::string &)
void set_align_style_from_io()
XMLProperty * add_property(const char *name, const std::string &value)
boost::shared_ptr< Port > nth(uint32_t n) const
framecnt_t interpolate(int channel, framecnt_t nframes, Sample *input, Sample *output)
boost::shared_ptr< AudioFileSource > write_source
uint32_t n_regions() const
void set_capture_insertion_in_progress(bool yn)
MonitorState monitoring_state() const
Sample * current_capture_buffer
void add_child_nocopy(XMLNode &)
void transport_stopped_wallclock(struct tm &, time_t, bool abort)
void request_input_monitoring(bool) const
pframes_t get_block_size() const
void set_captured_for(std::string str)
const RegionListProperty & region_list() const
void set_length(framecnt_t)
framepos_t current_start_frame() const
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > position
const ChanCount & count() const
void set(DataType t, uint32_t count)
void get_write_vector(rw_vector *)
void increment_write_ptr(size_t cnt)
OverlapType coverage(T sa, T ea, T sb, T eb)
framecnt_t capture_captured
void use_destructive_playlist()
int use_new_write_source(uint32_t n=0)
static void allocate_working_buffers()
bool record_enabling_legal() const
void transport_looped(framepos_t transport_frame)
void set_block_size(pframes_t)
framepos_t timeline_position() const
static const std::string state_node_name
framepos_t playback_sample
boost::shared_ptr< SessionPlaylists > playlists
void set_automatic(bool yn)
framecnt_t length() const
static const framepos_t max_framepos
static boost::shared_ptr< Source > createForRecovery(DataType type, Session &, const std::string &path, int chn)
int can_internal_playback_seek(framecnt_t distance)
const Sample * data(framecnt_t offset=0) const
bool prep_record_disable()
void reset_write_sources(bool, bool force=false)
boost::shared_ptr< AudioPlaylist > audio_playlist()
std::string write_source_name() const
boost::shared_ptr< T > reader() const
Glib::Threads::Mutex capture_info_lock
framecnt_t length(framepos_t pos) const
void adjust_capture_buffering()
static boost::shared_ptr< Region > create(boost::shared_ptr< const Region > other, bool announce=false)
PBD::RingBufferNPT< Sample >::rw_vector playback_vector
framepos_t overwrite_frame
framecnt_t speed_buffer_size
virtual int use_playlist(boost::shared_ptr< Playlist >)
boost::shared_ptr< Playlist > playlist()
virtual XMLNode & get_state(void)
void set_align_style(AlignStyle, bool force=false)
static boost::shared_ptr< Playlist > create(Session &, const XMLNode &, bool hidden=false, bool unused=false)
std::vector< boost::shared_ptr< Source > > SourceList
LIBARDOUR_API std::string region_name_from_path(std::string path, bool strip_channels, bool add_channel_suffix=false, uint32_t total=0, uint32_t this_one=0)
bool add(PropertyBase *prop)
bool can_become_destructive(bool &requires_bounce) const
XMLNode * deprecated_io_node
static gain_t * _gain_buffer
std::string string_compose(const std::string &fmt, const T1 &o1)
virtual int update_header(framepos_t when, struct tm &, time_t)=0
bool set_write_source_name(const std::string &str)
int do_flush(RunContext context, bool force=false)
static PBD::Signal0< void > DiskOverrun
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length
int set_destructive(bool yn)
void non_realtime_locate(framepos_t location)
Location * auto_punch_location() const
AlignStyle _alignment_style
static void swap_by_ptr(Sample *first, Sample *last)