summaryrefslogtreecommitdiff
path: root/libs/ardour/coreaudiosource.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-11-13 05:14:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-11-13 05:14:48 +0000
commitb85b4d9e54caef0585d308ef3bffee21d0e5ae56 (patch)
treea1ebeec149a57be4589ad6cabcd26c597703407c /libs/ardour/coreaudiosource.cc
parent520bc1bed49720333eb1a2be3ea0f813ccaac182 (diff)
make ardour3 build and link on OS X (tiger, at least)
git-svn-id: svn://localhost/ardour2/branches/3.0@8018 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/coreaudiosource.cc')
-rw-r--r--libs/ardour/coreaudiosource.cc21
1 files changed, 10 insertions, 11 deletions
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index 5212a3006d..d1038faf62 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -19,7 +19,6 @@
*/
#include <algorithm>
-#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include "pbd/error.h"
@@ -93,16 +92,16 @@ CoreAudioSource::~CoreAudioSource ()
}
int
-CoreAudioSource::safe_read (Sample* dst, nframes_t start, nframes_t cnt, AudioBufferList& abl) const
+CoreAudioSource::safe_read (Sample* dst, nframes_t start, framecnt_t cnt, AudioBufferList& abl) const
{
- nframes_t nread = 0;
+ framecnt_t nread = 0;
while (nread < cnt) {
try {
af.Seek (start+nread);
} catch (CAXException& cax) {
- error << string_compose("CoreAudioSource: %1 to %2 (%3)", cax.mOperation, start+nread, _name.substr (1)) << endmsg;
+ error << string_compose("CoreAudioSource: %1 to %2 (%3)", cax.mOperation, start+nread, _name.val().substr (1)) << endmsg;
return -1;
}
@@ -138,10 +137,10 @@ CoreAudioSource::safe_read (Sample* dst, nframes_t start, nframes_t cnt, AudioBu
}
-nframes_t
-CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, nframes_t cnt) const
+framecnt_t
+CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const
{
- nframes_t file_cnt;
+ framecnt_t file_cnt;
AudioBufferList abl;
abl.mNumberBuffers = 1;
@@ -167,7 +166,7 @@ CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, nframes_t cnt) co
}
if (file_cnt != cnt) {
- nframes_t delta = cnt - file_cnt;
+ frameoffset_t delta = cnt - file_cnt;
memset (dst+file_cnt, 0, sizeof (Sample) * delta);
}
@@ -194,7 +193,7 @@ CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, nframes_t cnt) co
/* stride through the interleaved data */
- for (uint32_t n = 0; n < file_cnt; ++n) {
+ for (framecnt_t n = 0; n < file_cnt; ++n) {
dst[n] = *ptr;
ptr += n_channels;
}
@@ -218,13 +217,13 @@ CoreAudioSource::sample_rate() const
}
int
-CoreAudioSource::update_header (framepos_t when, struct tm&, time_t)
+CoreAudioSource::update_header (framepos_t, struct tm&, time_t)
{
return 0;
}
int
-CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string& error_msg)
+CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string&)
{
FSRef ref;
ExtAudioFileRef af = 0;