diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-25 17:42:19 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-01-25 17:42:19 +0000 |
commit | 5ee3e58718f65ef9eb62a1b90d424dac68e770ff (patch) | |
tree | 10c4b9215d32e108878141124b07f6320f7d70e3 /libs/ardour/coreaudiosource.cc | |
parent | 1c61d4007a2fb3b6ea1a84ced86338cb65a66363 (diff) |
fix import/embed of multichannel audiofiles, as per #1433
git-svn-id: svn://localhost/ardour2/trunk@1386 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/coreaudiosource.cc')
-rw-r--r-- | libs/ardour/coreaudiosource.cc | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc index e38a34e378..572fd9ef81 100644 --- a/libs/ardour/coreaudiosource.cc +++ b/libs/ardour/coreaudiosource.cc @@ -34,33 +34,22 @@ using namespace PBD; CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node) : AudioFileSource (s, node) { - init (_name); + init (); } -CoreAudioSource::CoreAudioSource (Session& s, const string& idstr, Flag flags) - : AudioFileSource(s, idstr, flags) +CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag flags) + : AudioFileSource(s, path, flags), { - init (idstr); + channel = chn; + init (); } void -CoreAudioSource::init (string idstr) +CoreAudioSource::init () { - string::size_type pos; - tmpbuf = 0; tmpbufsize = 0; - _name = idstr; - - if ((pos = idstr.find_last_of (':')) == string::npos) { - channel = 0; - _path = idstr; - } else { - channel = atoi (idstr.substr (pos+1).c_str()); - _path = idstr.substr (0, pos); - } - cerr << "CoreAudioSource::init() " << name() << endl; /* note that we temporarily truncated _id at the colon */ |