summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-19 05:20:05 +0200
committerRobin Gareus <robin@gareus.org>2017-09-19 05:20:05 +0200
commit666aa5a55789fe248a47e0efeb33a6b56ba6b61d (patch)
tree4c2ebdc0f17d3b43aebfe23b62891da1cda6a802 /libs/ardour
parent29e553ab86ecb8112914b773b60cdbdcb855a750 (diff)
More Coreaudio SDK fixes, after 30b087ab3
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audio_unit.cc10
-rw-r--r--libs/ardour/caimportable.cc2
-rw-r--r--libs/ardour/coreaudiosource.cc4
3 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc
index 74b2591df9..0cea4dd099 100644
--- a/libs/ardour/audio_unit.cc
+++ b/libs/ardour/audio_unit.cc
@@ -738,7 +738,7 @@ AUPlugin::discover_parameters ()
kAudioUnitParameterUnit_Boolean = 2
kAudioUnitParameterUnit_Percent = 3
kAudioUnitParameterUnit_Seconds = 4
- kAudioUnitParameterUnit_SampleSamples = 5
+ kAudioUnitParameterUnit_SampleFrames = 5
kAudioUnitParameterUnit_Phase = 6
kAudioUnitParameterUnit_Rate = 7
kAudioUnitParameterUnit_Hertz = 8
@@ -787,7 +787,7 @@ AUPlugin::discover_parameters ()
d.integer_step = (info.unit == kAudioUnitParameterUnit_Indexed);
d.toggled = (info.unit == kAudioUnitParameterUnit_Boolean) ||
(d.integer_step && ((d.upper - d.lower) == 1.0));
- d.sr_dependent = (info.unit == kAudioUnitParameterUnit_SampleSamples);
+ d.sr_dependent = (info.unit == kAudioUnitParameterUnit_SampleFrames);
d.automatable = /* !d.toggled && -- ardour can automate toggles, can AU ? */
!(info.flags & kAudioUnitParameterFlag_NonRealTime) &&
(info.flags & kAudioUnitParameterFlag_IsWritable);
@@ -1074,8 +1074,8 @@ AUPlugin::set_block_size (pframes_t nframes)
deactivate ();
}
- DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("set MaximumSamplesPerSlice in global scope to %1\n", numSamples));
- if ((err = unit->SetProperty (kAudioUnitProperty_MaximumSamplesPerSlice, kAudioUnitScope_Global,
+ DEBUG_TRACE (DEBUG::AudioUnits, string_compose ("set MaximumFramesPerSlice in global scope to %1\n", numSamples));
+ if ((err = unit->SetProperty (kAudioUnitProperty_MaximumFramesPerSlice, kAudioUnitScope_Global,
0, &numSamples, sizeof (numSamples))) != noErr) {
error << string_compose (_("AU: cannot set max samples (err = %1)"), err) << endmsg;
return -1;
@@ -1121,7 +1121,7 @@ AUPlugin::configure_io (ChanCount in, ChanCount out)
#endif
streamFormat.mBitsPerChannel = 32;
- streamFormat.mSamplesPerPacket = 1;
+ streamFormat.mFramesPerPacket = 1;
/* apple says that for non-interleaved data, these
* values always refer to a single channel.
diff --git a/libs/ardour/caimportable.cc b/libs/ardour/caimportable.cc
index 13721f8334..008e78954c 100644
--- a/libs/ardour/caimportable.cc
+++ b/libs/ardour/caimportable.cc
@@ -107,7 +107,7 @@ CAImportableSource::channels () const
samplecnt_t
CAImportableSource::length () const
{
- return af.GetNumberSamples();
+ return af.GetNumberFrames();
}
samplecnt_t
diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc
index 9544371738..48040952db 100644
--- a/libs/ardour/coreaudiosource.cc
+++ b/libs/ardour/coreaudiosource.cc
@@ -85,7 +85,7 @@ CoreAudioSource::init_cafile ()
throw failed_constructor();
}
- _length = af.GetNumberSamples();
+ _length = af.GetNumberFrames();
CAStreamBasicDescription client_format (file_format);
@@ -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_FileLengthSamples, &size, &_info.length) != noErr) {
+ if (ExtAudioFileGetProperty(af, kExtAudioFileProperty_FileLengthFrames, &size, &_info.length) != noErr) {
goto out;
}