mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
used shared_ptr<Source>, somewhat successfully
git-svn-id: svn://localhost/ardour2/trunk@861 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c871ca6d98
commit
6535cd1b1d
45 changed files with 493 additions and 461 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include <ardour/audioplaylist.h>
|
||||
#include <ardour/audiofilesource.h>
|
||||
#include <ardour/region_factory.h>
|
||||
#include <ardour/source_factory.h>
|
||||
#include <pbd/memento_command.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
|
|
@ -189,7 +190,7 @@ int
|
|||
Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, ImportMode mode,
|
||||
AudioTrack* track, jack_nframes_t& pos, bool prompt)
|
||||
{
|
||||
AudioFileSource *source = 0; /* keep g++ quiet */
|
||||
boost::shared_ptr<AudioFileSource> source;
|
||||
SourceList sources;
|
||||
boost::shared_ptr<AudioRegion> region;
|
||||
string idspec;
|
||||
|
|
@ -269,7 +270,7 @@ Editor::embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool
|
|||
idspec += string_compose(":%1", n);
|
||||
|
||||
try {
|
||||
source = AudioFileSource::create (idspec.c_str(), (mode == ImportAsTrack ? AudioFileSource::Destructive : AudioFileSource::Flag (0)));
|
||||
source = boost::dynamic_pointer_cast<AudioFileSource> (SourceFactory::createReadable (idspec, (mode == ImportAsTrack ? AudioFileSource::Destructive : AudioFileSource::Flag (0))));
|
||||
sources.push_back(source);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue