diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-18 12:31:25 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-18 13:51:05 +0100 |
commit | 73c612259199051132399daadec38386a1a1ba53 (patch) | |
tree | 7d8b9b005705d9604f1f120629300fb428ac50b9 /gtk2_ardour | |
parent | 96cbcf0ee49b0f21f9953ca1ec6c3eab851c72ef (diff) |
towards a SRC source + resampling during audition
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/sfdb_ui.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 54faae5654..20de717001 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -52,6 +52,7 @@ #include "ardour/source_factory.h" #include "ardour/session.h" #include "ardour/session_directory.h" +#include "ardour/srcfilesource.h" #include "ardour_ui.h" #include "editing.h" @@ -389,8 +390,12 @@ SoundFileBox::audition () SourceFactory::createExternal (DataType::AUDIO, *_session, path, n, Source::Flag (0), false)); - - srclist.push_back(afs); + if (afs->sample_rate() != _session->nominal_frame_rate()) { + boost::shared_ptr<SrcFileSource> sfs (new SrcFileSource(*_session, afs)); + srclist.push_back(sfs); + } else { + srclist.push_back(afs); + } } catch (failed_constructor& err) { error << _("Could not access soundfile: ") << path << endmsg; |