#include <ardour/ardour.h>
#include <ardour/audioengine.h>
+#include <ardour/analyser.h>
#include <ardour/audio_diskstream.h>
#include <ardour/utils.h>
#include <ardour/configuration.h>
{
string newname;
boost::shared_ptr<AudioPlaylist> playlist;
-
+
if (!in_set_state && destructive()) {
return 0;
}
/* if per-track or global rec-enable turned on while the other was already on, we've started recording */
- if ((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record) ||
- ((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled()))) {
+ if (((change & track_rec_enabled) && record_enabled() && (!(change & global_rec_enabled) && can_record)) ||
+ (((change & global_rec_enabled) && can_record && (!(change & track_rec_enabled) && record_enabled())))) {
/* starting to record: compute first+last frames */
commit_should_unlock = false;
+ if (!_io->active()) {
+ _processed = true;
+ return 0;
+ }
+
check_record_status (transport_frame, nframes, can_record);
nominally_recording = (can_record && re);
nframes_t total = chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1];
if (necessary_samples > total) {
+ cerr << "underrun for " << _name << endl;
DiskUnderrun ();
goto out;
{
bool need_butler = false;
+ if (!_io->active()) {
+ return false;
+ }
+
if (_actual_speed < 0.0) {
playback_sample -= playback_distance;
} else {
s->update_header (capture_info.front()->start, when, twhen);
s->set_captured_for (_name);
s->mark_immutable ();
+ if (Config->get_auto_analyse_audio()) {
+ Analyser::queue_source_for_analysis (s, true);
+ }
}
}
{
g_atomic_int_set (&_record_enabled, 0);
boost::shared_ptr<ChannelList> c = channels.reader();
- for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
- if (Config->get_monitoring_model() == HardwareMonitoring) {
+ if (Config->get_monitoring_model() == HardwareMonitoring) {
+ for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
if ((*chan)->source) {
(*chan)->source->ensure_monitor_input (false);
}
up of the IO that owns this DS (::non_realtime_input_change())
*/
- in_set_state = false;
-
return 0;
}
int
AudioDiskstream::remove_channel_from (boost::shared_ptr<ChannelList> c, uint32_t how_many)
{
- while (--how_many && !c->empty()) {
+ while (how_many-- && !c->empty()) {
delete c->back();
c->pop_back();
}