mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 06:06:25 +01:00
Back-port tim mayberry's fixes for import; fix JACK slaving to never pay attention to timecode-source-is-synced
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2824 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9a45f09e15
commit
0e488bf060
8 changed files with 273 additions and 227 deletions
|
|
@ -21,26 +21,39 @@
|
|||
#define __ardour_importable_source_h__
|
||||
|
||||
#include <sndfile.h>
|
||||
#include <pbd/failed_constructor.h>
|
||||
#include <ardour/types.h>
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
class ImportableSource {
|
||||
public:
|
||||
ImportableSource (SNDFILE* sf, SF_INFO* info) : in (sf), sf_info (info) {}
|
||||
ImportableSource (const std::string& path)
|
||||
: in (sf_open (path.c_str(), SFM_READ, &sf_info), sf_close)
|
||||
{
|
||||
if (!in) throw failed_constructor();
|
||||
|
||||
}
|
||||
|
||||
virtual ~ImportableSource() {}
|
||||
|
||||
virtual nframes_t read (Sample* buffer, nframes_t nframes) {
|
||||
nframes_t per_channel = nframes / sf_info->channels;
|
||||
per_channel = sf_readf_float (in, buffer, per_channel);
|
||||
return per_channel * sf_info->channels;
|
||||
nframes_t per_channel = nframes / sf_info.channels;
|
||||
per_channel = sf_readf_float (in.get(), buffer, per_channel);
|
||||
return per_channel * sf_info.channels;
|
||||
}
|
||||
|
||||
virtual float ratio() const { return 1.0f; }
|
||||
|
||||
uint channels() const { return sf_info.channels; }
|
||||
|
||||
nframes_t length() const { return sf_info.frames; }
|
||||
|
||||
nframes_t samplerate() const { return sf_info.samplerate; }
|
||||
|
||||
protected:
|
||||
SNDFILE* in;
|
||||
SF_INFO* sf_info;
|
||||
SF_INFO sf_info;
|
||||
boost::shared_ptr<SNDFILE> in;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ namespace ARDOUR {
|
|||
class ResampledImportableSource : public ImportableSource
|
||||
{
|
||||
public:
|
||||
ResampledImportableSource (SNDFILE* sf, SF_INFO* info, nframes_t rate, SrcQuality);
|
||||
ResampledImportableSource (const std::string& path,
|
||||
nframes_t rate, SrcQuality);
|
||||
|
||||
~ResampledImportableSource ();
|
||||
|
||||
nframes_t read (Sample* buffer, nframes_t nframes);
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ class Session : public PBD::StatefulDestructible
|
|||
|
||||
};
|
||||
|
||||
int import_audiofile (import_status&);
|
||||
void import_audiofiles (import_status&);
|
||||
bool sample_rate_convert (import_status&, string infile, string& outfile);
|
||||
string build_tmp_convert_name (string file);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ class Slave {
|
|||
virtual bool starting() const { return false; }
|
||||
virtual nframes_t resolution() const = 0;
|
||||
virtual bool requires_seekahead () const = 0;
|
||||
virtual bool is_always_synced() const { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -139,6 +140,7 @@ class JACK_Slave : public Slave
|
|||
nframes_t resolution() const { return 1; }
|
||||
bool requires_seekahead () const { return false; }
|
||||
void reset_client (jack_client_t* jack);
|
||||
bool is_always_synced() const { return true; }
|
||||
|
||||
private:
|
||||
jack_client_t* jack;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@
|
|||
|
||||
#include <glibmm.h>
|
||||
|
||||
#include <boost/scoped_array.hpp>
|
||||
#include <boost/shared_array.hpp>
|
||||
|
||||
#include <pbd/basename.h>
|
||||
#include <pbd/convert.h>
|
||||
|
||||
|
|
@ -49,77 +52,46 @@
|
|||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
int
|
||||
Session::import_audiofile (import_status& status)
|
||||
static std::auto_ptr<ImportableSource>
|
||||
open_importable_source (const string& path, nframes_t samplerate, ARDOUR::SrcQuality quality)
|
||||
{
|
||||
std::auto_ptr<ImportableSource> source(new ImportableSource(path));
|
||||
|
||||
if (source->samplerate() == samplerate) {
|
||||
return source;
|
||||
}
|
||||
|
||||
return std::auto_ptr<ImportableSource>(new ResampledImportableSource(path, samplerate, quality));
|
||||
}
|
||||
|
||||
static std::string
|
||||
get_non_existent_filename (const std::string& basename, uint channel, uint channels)
|
||||
{
|
||||
SNDFILE *in;
|
||||
vector<boost::shared_ptr<AudioFileSource> > newfiles;
|
||||
SF_INFO info;
|
||||
float *data = 0;
|
||||
Sample **channel_data = 0;
|
||||
int nfiles = 0;
|
||||
string basepath;
|
||||
string sounds_dir;
|
||||
nframes_t so_far;
|
||||
char buf[PATH_MAX+1];
|
||||
int ret = -1;
|
||||
vector<string> new_paths;
|
||||
struct tm* now;
|
||||
ImportableSource* importable = 0;
|
||||
const nframes_t nframes = ResampledImportableSource::blocksize;
|
||||
uint32_t cnt = 1;
|
||||
|
||||
status.sources.clear ();
|
||||
|
||||
for (vector<Glib::ustring>::iterator p = status.paths.begin(); p != status.paths.end(); ++p, ++cnt) {
|
||||
|
||||
if ((in = sf_open ((*p).c_str(), SFM_READ, &info)) == 0) {
|
||||
error << string_compose(_("Import: cannot open input sound file \"%1\""), (*p)) << endmsg;
|
||||
status.done = 1;
|
||||
status.cancel = 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((nframes_t) info.samplerate != frame_rate()) {
|
||||
importable = new ResampledImportableSource (in, &info, frame_rate(), status.quality);
|
||||
} else {
|
||||
importable = new ImportableSource (in, &info);
|
||||
}
|
||||
|
||||
newfiles.clear ();
|
||||
|
||||
for (int n = 0; n < info.channels; ++n) {
|
||||
newfiles.push_back (boost::shared_ptr<AudioFileSource>());
|
||||
}
|
||||
|
||||
sounds_dir = discover_best_sound_dir ();
|
||||
basepath = PBD::basename_nosuffix ((*p));
|
||||
|
||||
for (int n = 0; n < info.channels; ++n) {
|
||||
|
||||
bool goodfile = false;
|
||||
string base(basename);
|
||||
|
||||
do {
|
||||
if (info.channels == 2) {
|
||||
if (n == 0) {
|
||||
snprintf (buf, sizeof(buf), "%s/%s-L.wav", sounds_dir.c_str(), basepath.c_str());
|
||||
if (channels == 2) {
|
||||
if (channel == 0) {
|
||||
snprintf (buf, sizeof(buf), "%s-L.wav", base.c_str());
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf), "%s/%s-R.wav", sounds_dir.c_str(), basepath.c_str());
|
||||
snprintf (buf, sizeof(buf), "%s-R.wav", base.c_str());
|
||||
}
|
||||
} else if (info.channels > 1) {
|
||||
snprintf (buf, sizeof(buf), "%s/%s-c%d.wav", sounds_dir.c_str(), basepath.c_str(), n+1);
|
||||
} else if (channels > 1) {
|
||||
snprintf (buf, sizeof(buf), "%s-c%d.wav", base.c_str(), channel+1);
|
||||
} else {
|
||||
snprintf (buf, sizeof(buf), "%s/%s.wav", sounds_dir.c_str(), basepath.c_str());
|
||||
snprintf (buf, sizeof(buf), "%s.wav", base.c_str());
|
||||
}
|
||||
|
||||
if (Glib::file_test (buf, Glib::FILE_TEST_EXISTS)) {
|
||||
|
||||
/* if the file already exists, we must come up with
|
||||
* a new name for it. for now we just keep appending
|
||||
* _ to basepath
|
||||
* _ to basename
|
||||
*/
|
||||
|
||||
basepath += "_";
|
||||
base += "_";
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -128,147 +100,210 @@ Session::import_audiofile (import_status& status)
|
|||
|
||||
} while ( !goodfile);
|
||||
|
||||
try {
|
||||
newfiles[n] = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createWritable (*this, buf, false, frame_rate()));
|
||||
return buf;
|
||||
}
|
||||
|
||||
catch (failed_constructor& err) {
|
||||
error << string_compose(_("Session::import_audiofile: cannot open new file source for channel %1"), n+1) << endmsg;
|
||||
goto out;
|
||||
static vector<string>
|
||||
get_paths_for_new_sources (const string& import_file_path, const string& session_dir, uint channels)
|
||||
{
|
||||
vector<string> new_paths;
|
||||
const string basename = basename_nosuffix (import_file_path);
|
||||
|
||||
for (uint n = 0; n < channels; ++n) {
|
||||
|
||||
std::string filepath;
|
||||
|
||||
filepath = session_dir;
|
||||
filepath += '/';
|
||||
filepath += get_non_existent_filename (basename, n, channels);
|
||||
|
||||
new_paths.push_back (filepath);
|
||||
}
|
||||
|
||||
new_paths.push_back (buf);
|
||||
newfiles[n]->prepare_for_peakfile_writes ();
|
||||
nfiles++;
|
||||
return new_paths;
|
||||
}
|
||||
|
||||
if (data) {
|
||||
delete [] data;
|
||||
static bool
|
||||
create_mono_sources_for_writing (const vector<string>& new_paths, Session& sess,
|
||||
uint samplerate, vector<boost::shared_ptr<AudioFileSource> >& newfiles)
|
||||
{
|
||||
for (vector<string>::const_iterator i = new_paths.begin();
|
||||
i != new_paths.end(); ++i)
|
||||
{
|
||||
boost::shared_ptr<Source> source;
|
||||
|
||||
try
|
||||
{
|
||||
source = SourceFactory::createWritable (
|
||||
sess,
|
||||
i->c_str(),
|
||||
false, // destructive
|
||||
samplerate
|
||||
);
|
||||
}
|
||||
catch (const failed_constructor& err)
|
||||
{
|
||||
error << string_compose (_("Unable to create file %1 during import"), *i) << endmsg;
|
||||
return false;
|
||||
}
|
||||
|
||||
data = new float[nframes * info.channels];
|
||||
|
||||
if (channel_data) {
|
||||
delete [] channel_data;
|
||||
newfiles.push_back(boost::dynamic_pointer_cast<AudioFileSource>(source));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
channel_data = new Sample * [ info.channels ];
|
||||
|
||||
for (int n = 0; n < info.channels; ++n) {
|
||||
channel_data[n] = new Sample[nframes];
|
||||
static Glib::ustring
|
||||
compose_status_message (const string& path,
|
||||
uint file_samplerate,
|
||||
uint session_samplerate,
|
||||
uint current_file,
|
||||
uint total_files)
|
||||
{
|
||||
if (file_samplerate != session_samplerate) {
|
||||
return string_compose (_("converting %1\n(resample from %2KHz to %3KHz)\n(%4 of %5)"),
|
||||
Glib::path_get_basename (path),
|
||||
file_samplerate/1000.0f,
|
||||
session_samplerate/1000.0f,
|
||||
current_file, total_files);
|
||||
}
|
||||
|
||||
so_far = 0;
|
||||
|
||||
if ((nframes_t) info.samplerate != frame_rate()) {
|
||||
status.doing_what = string_compose (_("converting %1\n(resample from %2KHz to %3KHz)\n(%4 of %5)"),
|
||||
basepath,
|
||||
info.samplerate/1000.0f,
|
||||
frame_rate()/1000.0f,
|
||||
cnt, status.paths.size());
|
||||
|
||||
} else {
|
||||
status.doing_what = string_compose (_("converting %1\n(%2 of %3)"),
|
||||
basepath,
|
||||
cnt, status.paths.size());
|
||||
|
||||
return string_compose (_("converting %1\n(%2 of %3)"),
|
||||
Glib::path_get_basename (path),
|
||||
current_file, total_files);
|
||||
}
|
||||
|
||||
status.progress = 0.0;
|
||||
static void
|
||||
write_audio_data_to_new_files (ImportableSource* source, Session::import_status& status,
|
||||
vector<boost::shared_ptr<AudioFileSource> >& newfiles)
|
||||
{
|
||||
const nframes_t nframes = ResampledImportableSource::blocksize;
|
||||
uint channels = source->channels();
|
||||
|
||||
boost::scoped_array<float> data(new float[nframes * channels]);
|
||||
vector<boost::shared_array<Sample> > channel_data;
|
||||
|
||||
for (uint n = 0; n < channels; ++n) {
|
||||
channel_data.push_back(boost::shared_array<Sample>(new Sample[nframes]));
|
||||
}
|
||||
|
||||
uint read_count = 0;
|
||||
status.progress = 0.0f;
|
||||
|
||||
while (!status.cancel) {
|
||||
|
||||
nframes_t nread, nfread;
|
||||
long x;
|
||||
long chn;
|
||||
uint x;
|
||||
uint chn;
|
||||
|
||||
if ((nread = importable->read (data, nframes)) == 0) {
|
||||
if ((nread = source->read (data.get(), nframes)) == 0) {
|
||||
break;
|
||||
}
|
||||
nfread = nread / info.channels;
|
||||
nfread = nread / channels;
|
||||
|
||||
/* de-interleave */
|
||||
|
||||
for (chn = 0; chn < info.channels; ++chn) {
|
||||
for (chn = 0; chn < channels; ++chn) {
|
||||
|
||||
nframes_t n;
|
||||
for (x = chn, n = 0; n < nfread; x += info.channels, ++n) {
|
||||
for (x = chn, n = 0; n < nfread; x += channels, ++n) {
|
||||
channel_data[chn][n] = (Sample) data[x];
|
||||
}
|
||||
}
|
||||
|
||||
/* flush to disk */
|
||||
|
||||
for (chn = 0; chn < info.channels; ++chn) {
|
||||
newfiles[chn]->write (channel_data[chn], nfread);
|
||||
for (chn = 0; chn < channels; ++chn) {
|
||||
newfiles[chn]->write (channel_data[chn].get(), nfread);
|
||||
}
|
||||
|
||||
so_far += nread;
|
||||
status.progress = so_far / (importable->ratio () * info.frames * info.channels);
|
||||
}
|
||||
|
||||
if (status.cancel) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (int n = 0; n < info.channels; ++n) {
|
||||
status.sources.push_back (newfiles[n]);
|
||||
}
|
||||
|
||||
if (status.cancel) {
|
||||
goto out;
|
||||
read_count += nread;
|
||||
status.progress = read_count / (source->ratio () * source->length() * channels);
|
||||
}
|
||||
}
|
||||
|
||||
status.freeze = true;
|
||||
static void
|
||||
remove_file_source (boost::shared_ptr<AudioFileSource> file_source)
|
||||
{
|
||||
::unlink (file_source->path().c_str());
|
||||
}
|
||||
|
||||
void
|
||||
Session::import_audiofiles (import_status& status)
|
||||
{
|
||||
uint32_t cnt = 1;
|
||||
typedef vector<boost::shared_ptr<AudioFileSource> > AudioSources;
|
||||
AudioSources all_new_sources;
|
||||
|
||||
status.sources.clear ();
|
||||
|
||||
for (vector<Glib::ustring>::iterator p = status.paths.begin();
|
||||
p != status.paths.end() && !status.cancel;
|
||||
++p, ++cnt)
|
||||
{
|
||||
std::auto_ptr<ImportableSource> source;
|
||||
|
||||
try
|
||||
{
|
||||
source = open_importable_source (*p, frame_rate(), status.quality);
|
||||
}
|
||||
catch (const failed_constructor& err)
|
||||
{
|
||||
error << string_compose(_("Import: cannot open input sound file \"%1\""), (*p)) << endmsg;
|
||||
status.done = status.cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
vector<string> new_paths = get_paths_for_new_sources (*p,
|
||||
discover_best_sound_dir (),
|
||||
source->channels());
|
||||
|
||||
AudioSources newfiles;
|
||||
|
||||
status.cancel = !create_mono_sources_for_writing (new_paths, *this, frame_rate(), newfiles);
|
||||
|
||||
// copy on cancel/failure so that any files that were created will be removed below
|
||||
std::copy (newfiles.begin(), newfiles.end(), std::back_inserter(all_new_sources));
|
||||
|
||||
if (status.cancel) break;
|
||||
|
||||
for (AudioSources::iterator i = newfiles.begin(); i != newfiles.end(); ++i) {
|
||||
(*i)->prepare_for_peakfile_writes ();
|
||||
}
|
||||
|
||||
status.doing_what = compose_status_message (*p, source->samplerate(),
|
||||
frame_rate(), cnt, status.paths.size());
|
||||
|
||||
write_audio_data_to_new_files (source.get(), status, newfiles);
|
||||
}
|
||||
|
||||
if (!status.cancel) {
|
||||
struct tm* now;
|
||||
time_t xnow;
|
||||
time (&xnow);
|
||||
now = localtime (&xnow);
|
||||
status.freeze = true;
|
||||
|
||||
/* flush the final length(s) to the header(s) */
|
||||
|
||||
for (SourceList::iterator x = status.sources.begin(); x != status.sources.end() && !status.cancel; ++x) {
|
||||
boost::dynamic_pointer_cast<AudioFileSource>(*x)->update_header(0, *now, xnow);
|
||||
boost::dynamic_pointer_cast<AudioSource>(*x)->done_with_peakfile_writes ();
|
||||
for (AudioSources::iterator x = all_new_sources.begin();
|
||||
x != all_new_sources.end(); ++x)
|
||||
{
|
||||
(*x)->update_header(0, *now, xnow);
|
||||
(*x)->done_with_peakfile_writes ();
|
||||
}
|
||||
|
||||
/* save state so that we don't lose these new Sources */
|
||||
|
||||
if (!status.cancel) {
|
||||
save_state (_name);
|
||||
|
||||
std::copy (all_new_sources.begin(), all_new_sources.end(),
|
||||
std::back_inserter(status.sources));
|
||||
} else {
|
||||
// this can throw...but it seems very unlikely
|
||||
std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source);
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
out:
|
||||
|
||||
if (data) {
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
if (channel_data) {
|
||||
for (int n = 0; n < info.channels; ++n) {
|
||||
delete [] channel_data[n];
|
||||
}
|
||||
delete [] channel_data;
|
||||
}
|
||||
|
||||
if (status.cancel) {
|
||||
|
||||
status.sources.clear ();
|
||||
|
||||
for (vector<string>::iterator i = new_paths.begin(); i != new_paths.end(); ++i) {
|
||||
unlink ((*i).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if (importable) {
|
||||
delete importable;
|
||||
}
|
||||
|
||||
sf_close (in);
|
||||
status.done = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,13 @@ using namespace PBD;
|
|||
|
||||
const uint32_t ResampledImportableSource::blocksize = 4096U;
|
||||
|
||||
ResampledImportableSource::ResampledImportableSource (SNDFILE* sf, SF_INFO* info, nframes_t rate, SrcQuality srcq)
|
||||
: ImportableSource (sf, info)
|
||||
ResampledImportableSource::ResampledImportableSource (const std::string& path,
|
||||
nframes_t rate, SrcQuality srcq)
|
||||
: ImportableSource (path)
|
||||
{
|
||||
int err;
|
||||
|
||||
sf_seek (in, 0, SEEK_SET) ;
|
||||
sf_seek (in.get(), 0, SEEK_SET) ;
|
||||
|
||||
/* Initialize the sample rate converter. */
|
||||
|
||||
|
|
@ -57,7 +58,7 @@ ResampledImportableSource::ResampledImportableSource (SNDFILE* sf, SF_INFO* info
|
|||
break;
|
||||
}
|
||||
|
||||
if ((src_state = src_new (src_type, sf_info->channels, &err)) == 0) {
|
||||
if ((src_state = src_new (src_type, sf_info.channels, &err)) == 0) {
|
||||
error << string_compose(_("Import: src_new() failed : %1"), src_strerror (err)) << endmsg ;
|
||||
throw failed_constructor ();
|
||||
}
|
||||
|
|
@ -69,7 +70,7 @@ ResampledImportableSource::ResampledImportableSource (SNDFILE* sf, SF_INFO* info
|
|||
src_data.input_frames = 0 ;
|
||||
src_data.data_in = input ;
|
||||
|
||||
src_data.src_ratio = ((float) rate) / sf_info->samplerate ;
|
||||
src_data.src_ratio = ((float) rate) / sf_info.samplerate ;
|
||||
|
||||
input = new float[blocksize];
|
||||
}
|
||||
|
|
@ -97,14 +98,14 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes)
|
|||
src_data.end_of_input = SF_TRUE ;
|
||||
}
|
||||
|
||||
src_data.input_frames /= sf_info->channels;
|
||||
src_data.input_frames /= sf_info.channels;
|
||||
src_data.data_in = input ;
|
||||
}
|
||||
|
||||
src_data.data_out = output;
|
||||
|
||||
if (!src_data.end_of_input) {
|
||||
src_data.output_frames = nframes / sf_info->channels ;
|
||||
src_data.output_frames = nframes / sf_info.channels ;
|
||||
} else {
|
||||
src_data.output_frames = src_data.input_frames;
|
||||
}
|
||||
|
|
@ -120,9 +121,9 @@ ResampledImportableSource::read (Sample* output, nframes_t nframes)
|
|||
return 0;
|
||||
}
|
||||
|
||||
src_data.data_in += src_data.input_frames_used * sf_info->channels ;
|
||||
src_data.data_in += src_data.input_frames_used * sf_info.channels ;
|
||||
src_data.input_frames -= src_data.input_frames_used ;
|
||||
|
||||
return src_data.output_frames_gen * sf_info->channels;
|
||||
return src_data.output_frames_gen * sf_info.channels;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ Session::follow_slave (nframes_t nframes, nframes_t offset)
|
|||
<< endl;
|
||||
#endif
|
||||
|
||||
if (Config->get_timecode_source_is_synced()) {
|
||||
if (_slave->is_always_synced() || Config->get_timecode_source_is_synced()) {
|
||||
|
||||
/* if the TC source is synced, then we assume that its
|
||||
speed is binary: 0.0 or 1.0
|
||||
|
|
@ -626,7 +626,7 @@ Session::follow_slave (nframes_t nframes, nframes_t offset)
|
|||
slave_state = Stopped;
|
||||
}
|
||||
|
||||
if (slave_state == Running && !Config->get_timecode_source_is_synced()) {
|
||||
if (slave_state == Running && !_slave->is_always_synced() && !Config->get_timecode_source_is_synced()) {
|
||||
|
||||
|
||||
if (_transport_speed != 0.0f) {
|
||||
|
|
|
|||
|
|
@ -76,10 +76,6 @@ Session::request_slave_source (SlaveSource src)
|
|||
void
|
||||
Session::request_transport_speed (float speed)
|
||||
{
|
||||
if (speed != 0.0 && speed != 1.0) {
|
||||
cerr << "odd speed requested\n";
|
||||
stacktrace (cerr, 20);
|
||||
}
|
||||
Event* ev = new Event (Event::SetTransportSpeed, Event::Add, Event::Immediate, 0, speed);
|
||||
queue_event (ev);
|
||||
}
|
||||
|
|
@ -756,8 +752,6 @@ Session::locate (nframes_t target_frame, bool with_roll, bool with_flush, bool w
|
|||
void
|
||||
Session::set_transport_speed (float speed, bool abort)
|
||||
{
|
||||
cerr << "Session::set_transport_speed " << speed << " abort capture ? " << abort << endl;
|
||||
|
||||
if (_transport_speed == speed) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -819,7 +813,6 @@ Session::set_transport_speed (float speed, bool abort)
|
|||
}
|
||||
|
||||
if ((synced_to_jack()) && speed != 0.0 && speed != 1.0) {
|
||||
cerr << "synced to jack and speed == " << speed << endl;
|
||||
warning << _("Global varispeed cannot be supported while Ardour is connected to JACK transport control")
|
||||
<< endmsg;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue