AudioDeviceSetProperty: kAudioDevicePropertyBufferFrameSize
AudioDeviceSetProperty: kAudioDevicePropertyBufferFrameSize
- Subject: AudioDeviceSetProperty: kAudioDevicePropertyBufferFrameSize
- From: Bill Farmer <email@hidden>
- Date: Sat, 04 Feb 2012 12:18:45 +0000
Hi
I have an error report from one user reporting 'nope',
kAudioHardwareIllegalOperationError from AudioDeviceSetProperty:
kAudioDevicePropertyBufferFrameSize setting the buffer size probably to
4096. The reason I can't be sure is that the buffer size is calculated
at run time dependent on whether the sample rate can be reduced to 11025
or 12000. The application is an musical instrument tuner so I am not
interested in anything higher than about 4Khz, so there is no point in
sampling at any higher rate. On the macs I have tested the sample rate
has stayed at 48000, so I have had to downsample by taking every fourth
sample and increase the buffer size accordingly.
The user says: "I'm running OS 10.6.8 on an Intel Core 2 Duo iMac. I
also tried my MacBook Pro and got the same error". I'm a bit puzzled by
this, the application has been out there for download on Google code
since September 2010, with the same bit of code in it, and this is the
first report I've had.
What the application is attempting to do is set up an AUHal audio unit
for input in accordance with Technical Note TN2091 with a sample rate of
11025 or 12000 and a frame size of 1024, or failing that, to downsample
to achieve the same thing. There has been previous correspondence on
this here:
http://lists.apple.com/archives/coreaudio-api/2010/Oct/msg00224.html. I
did what the man said and it worked just fine.
Is there a standard way of doing this that I have missed? Should I be
attempting to set the buffer size range:
kAudioDevicePropertyBufferFrameSizeRange? Is it possible to use a format
converter to downsample on audio input?
Regards
Bill Farmer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden