From 5ee3e58718f65ef9eb62a1b90d424dac68e770ff Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 25 Jan 2007 17:42:19 +0000 Subject: fix import/embed of multichannel audiofiles, as per #1433 git-svn-id: svn://localhost/ardour2/trunk@1386 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/coreaudiosource.cc | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'libs/ardour/coreaudiosource.cc') 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 */ -- cgit v1.2.3