Re: problem setting sampling rate for speaker
Re: problem setting sampling rate for speaker
- Subject: Re: problem setting sampling rate for speaker
- From: gopinath sankar <email@hidden>
- Date: Mon, 21 May 2012 12:13:28 -0700
After looking around, it looks like I cannot force a fixed sampling
rate. The workaround would be to take the 48khz data i have through a
converter and play it at native 44.1khz.
On Thu, May 17, 2012 at 7:27 PM, gopinath sankar
<email@hidden> wrote:
> Hello,
>
> I can't seem to get the audio to render at 48khz. I set the sampling
> rate to 48000.0f, it seems to accept it fine. But when I add a timing
> code in my render callback I only get around 441000 samples per
> second. I am getting called 94 times a second and each time I play 470
> bytes (noFrames of the render callback as well as
> mBuffers[0].mDataByteSize/sizeof(AudioUnitSampleType) point to 470)
> making it 441000 samples per second.
>
> I am assuming if I should be able to play out 512 frames per call to
> get 48khz rendering.
> Also, is there a way I can play with frames per call vs. no. calls per
> second? I have set the kaudioDevicePropertyBufferSize to 512 *
> sizeof(Float32) and it seemed to be picking it up (get returns the
> value I set) but it seems to be ignored while rendering in favor of
> 470 samples.
>
> Thanks,
> Gopinath
_______________________________________________
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