#include <cstdlib>
#include <ctime>
-#include <pbd/gstdio_compat.h>
+#include "pbd/gstdio_compat.h"
#include "pbd/error.h"
#include "pbd/xml++.h"
#include "pbd/memento_command.h"
#include "ardour/types.h"
#include "ardour/utils.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
#include <locale.h>
using namespace std;
need_write_sources = true;
}
- if (input_change_pending.type == IOChange::ConfigurationChanged) {
+ if (input_change_pending.type & IOChange::ConfigurationChanged) {
RCUWriter<ChannelList> writer (channels);
boost::shared_ptr<ChannelList> c = writer.get_copy();
boost::shared_ptr<Region> rp;
{
- const RegionList& rl (_playlist->region_list().rlist());
+ const RegionList& rl (_playlist->region_list_property().rlist());
if (rl.size() > 0) {
assert((rl.size() == 1));
rp = rl.front();
throw failed_constructor();
}
- /* be sure to stretch the region out to the maximum length */
+ /* be sure to stretch the region out to the maximum length (non-musical)*/
- region->set_length (max_framepos - region->position());
+ region->set_length (max_framepos - region->position(), 0);
uint32_t n;
ChannelList::iterator chan;
{
XMLNode& node (Diskstream::get_state());
char buf[64] = "";
- LocaleGuard lg (X_("C"));
+ LocaleGuard lg;
boost::shared_ptr<ChannelList> c = channels.reader();
snprintf (buf, sizeof(buf), "%u", (unsigned int) c->size());
int
AudioDiskstream::set_state (const XMLNode& node, int version)
{
- const XMLProperty* prop;
+ XMLProperty const * prop;
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
uint32_t nchans = 1;
XMLNode* capture_pending_node = 0;
- LocaleGuard lg (X_("C"));
+ LocaleGuard lg;
/* prevent write sources from being created */
boost::shared_ptr<ChannelList> c = channels.reader();
if (c->empty ()) {
- return 0;
+ return 1.0;
}
return (float) ((double) c->front()->playback_buf->read_space()/
- (double) c->front()->playback_buf->bufsize());
+ (double) c->front()->playback_buf->bufsize());
}
float
boost::shared_ptr<ChannelList> c = channels.reader();
if (c->empty ()) {
- return 0;
+ return 1.0;
}
return (float) ((double) c->front()->capture_buf->write_space()/
int
AudioDiskstream::use_pending_capture_data (XMLNode& node)
{
- const XMLProperty* prop;
+ XMLProperty const * prop;
XMLNodeList nlist = node.children();
XMLNodeIterator niter;
boost::shared_ptr<AudioFileSource> fs;
boost::shared_ptr<Region> first;
{
- const RegionList& rl (_playlist->region_list().rlist());
+ const RegionList& rl (_playlist->region_list_property().rlist());
assert((rl.size() == 1));
first = rl.front();