RE: buffer size magical reduction
RE: buffer size magical reduction
- Subject: RE: buffer size magical reduction
- From: Stéphane Beauchemin <email@hidden>
- Date: Mon, 29 Nov 2010 08:20:13 -0500
- Thread-topic: buffer size magical reduction
4096 is the default buffer size when you are in the default audio category for you Audio Session (default is kAudioSessionCategory_AmbientSound when you don't specifically initialize it).
Try doing the following:
AudioSessionInitialize ( NULL, NULL, NULL, NULL);
UInt32 sessionCategory = kAudioSessionCategory_SoloAmbientSound
AudioSessionSetProperty (kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory);
If you are in the mode kAudioSessionCategory_AmbientSound, you won't get requested buffer size because you not the only app talking to the hardware. With kAudioSessionCategory_SoloAmbientSound you should get the requested buffer size unless you are asking for something really small. 2048 should be ok, I was able to successfully request 1024.
Side effect of this -> other apps will be muted :-)
I hope this helps,
Stephane
-----Original Message-----
From: coreaudio-api-bounces+sbeauchemin=email@hidden [mailto:coreaudio-api-bounces+sbeauchemin=email@hidden] On Behalf Of David Plans
Sent: November-28-10 4:40 PM
To: Paul Davis
Cc: email@hidden
Subject: Re: buffer size magical reduction
On Nov 28, 2010, at 3:43 PM, Paul Davis wrote:
> you get something supported by the h/w and other layers of the
> CoreAudio API; you can find out its value as described by the quoted
> sentence you mentioned.
But the thing is, we consistently get _half_ of the buffersize we ask for...that is, no matter what we ask for, we get exactly that, I can't see why.
Surely, if it had to do something with hardware supported, there would be some immovable low/high limit that I'd hit when I set it very low or very high?
Which isn't the case, it just gets cut in half.
> btw, PureData doesn't "have" a blocksize per-se that matters in this
> sense.. Its quite happy to adapt to the blocksize imposed by outside
> factors, like the audio h/w, OS audio API etc. etc.
Well, by 'have' I meant that Miller Puckette wrote:
#define DEFDACBLKSIZE 64
into s_stuff.h and that traditionally, that's PD's blocksize
_______________________________________________
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
_______________________________________________
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