summaryrefslogtreecommitdiff
path: root/libs/ardour/coreaudiosource.cc
diff options
context:
space:
mode:
authorTaybin Rutkin <taybin@taybin.com>2007-04-07 21:34:17 +0000
committerTaybin Rutkin <taybin@taybin.com>2007-04-07 21:34:17 +0000
commit7d1b3fc9b362c7a3731cef91852a08380c1987d8 (patch)
tree2a1cd81dc48c135dd3f1831645e1259bf8a2ece5 /libs/ardour/coreaudiosource.cc
parentcaca12c73f4a203cd496c4a50dec6eb4c4553110 (diff)
Updated CoreAudioSource to compile again.
Renamed nil to nil_ throughout sigc++. It's a reserved word in ObjC and was interfering with compilation. git-svn-id: svn://localhost/ardour2/trunk@1684 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/coreaudiosource.cc')
-rw-r--r--libs/ardour/coreaudiosource.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index 572fd9ef81..703225e502 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -38,9 +38,10 @@ CoreAudioSource::CoreAudioSource (Session& s, const XMLNode& node)
}
CoreAudioSource::CoreAudioSource (Session& s, const string& path, int chn, Flag flags)
- : AudioFileSource(s, path, flags),
+ /* files created this way are never writable or removable */
+ : AudioFileSource (s, path, Flag (flags & ~(Writable|Removable|RemovableIfEmpty|RemoveAtDestroy)))
{
- channel = chn;
+ _channel = chn;
init ();
}
@@ -60,8 +61,8 @@ CoreAudioSource::init ()
n_channels = file_asbd.NumberChannels();
cerr << "number of channels: " << n_channels << endl;
- if (channel >= n_channels) {
- error << string_compose("CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel number (%3)", n_channels, channel, name()) << endmsg;
+ if (_channel >= n_channels) {
+ error << string_compose("CoreAudioSource: file only contains %1 channels; %2 is invalid as a channel number (%3)", n_channels, _channel, name()) << endmsg;
throw failed_constructor();
}
@@ -132,14 +133,14 @@ CoreAudioSource::read_unlocked (Sample *dst, nframes_t start, nframes_t cnt) con
abl.mBuffers[0].mDataByteSize = tmpbufsize * sizeof(Sample);
abl.mBuffers[0].mData = tmpbuf;
- cerr << "channel: " << channel << endl;
+ cerr << "channel: " << _channel << endl;
try {
af.Read (real_cnt, &abl);
} catch (CAXException& cax) {
error << string_compose("CoreAudioSource: %1 (%2)", cax.mOperation, _name);
}
- float *ptr = tmpbuf + channel;
+ float *ptr = tmpbuf + _channel;
real_cnt /= n_channels;
/* stride through the interleaved data */