summaryrefslogtreecommitdiff
path: root/libs/ardour/coreaudiosource.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-09-18 12:39:17 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-09-18 12:39:17 -0400
commit30b087ab3d28f1585987fa3f6ae006562ae192e3 (patch)
tree620ae0250b5d77f90a18f8c2b83be61e4fe7b0b5 /libs/ardour/coreaudiosource.cc
parentcb956e3e480716a3efd280a5287bdd7bee1cedc5 (diff)
globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode and video in order to keep the legible
Diffstat (limited to 'libs/ardour/coreaudiosource.cc')
-rw-r--r--libs/ardour/coreaudiosource.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index 90ab07b86d..9544371738 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -85,7 +85,7 @@ CoreAudioSource::init_cafile ()
throw failed_constructor();
}
- _length = af.GetNumberFrames();
+ _length = af.GetNumberSamples();
CAStreamBasicDescription client_format (file_format);
@@ -115,9 +115,9 @@ CoreAudioSource::close ()
}
int
-CoreAudioSource::safe_read (Sample* dst, framepos_t start, framecnt_t cnt, AudioBufferList& abl) const
+CoreAudioSource::safe_read (Sample* dst, samplepos_t start, samplecnt_t cnt, AudioBufferList& abl) const
{
- framecnt_t nread = 0;
+ samplecnt_t nread = 0;
while (nread < cnt) {
@@ -160,10 +160,10 @@ CoreAudioSource::safe_read (Sample* dst, framepos_t start, framecnt_t cnt, Audio
}
-framecnt_t
-CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) const
+samplecnt_t
+CoreAudioSource::read_unlocked (Sample *dst, samplepos_t start, samplecnt_t cnt) const
{
- framecnt_t file_cnt;
+ samplecnt_t file_cnt;
AudioBufferList abl;
abl.mNumberBuffers = 1;
@@ -189,7 +189,7 @@ CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) c
}
if (file_cnt != cnt) {
- frameoffset_t delta = cnt - file_cnt;
+ sampleoffset_t delta = cnt - file_cnt;
memset (dst+file_cnt, 0, sizeof (Sample) * delta);
}
@@ -213,7 +213,7 @@ CoreAudioSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) c
/* stride through the interleaved data */
- for (framecnt_t n = 0; n < file_cnt; ++n) {
+ for (samplecnt_t n = 0; n < file_cnt; ++n) {
dst[n] = *ptr;
ptr += n_channels;
}
@@ -237,7 +237,7 @@ CoreAudioSource::sample_rate() const
}
int
-CoreAudioSource::update_header (framepos_t, struct tm&, time_t)
+CoreAudioSource::update_header (samplepos_t, struct tm&, time_t)
{
return 0;
}
@@ -282,7 +282,7 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string&)
_info.channels = absd.mChannelsPerFrame;
size = sizeof(_info.length);
- if (ExtAudioFileGetProperty(af, kExtAudioFileProperty_FileLengthFrames, &size, &_info.length) != noErr) {
+ if (ExtAudioFileGetProperty(af, kExtAudioFileProperty_FileLengthSamples, &size, &_info.length) != noErr) {
goto out;
}