Re: Getting distorted sound from AU
Re: Getting distorted sound from AU
- Subject: Re: Getting distorted sound from AU
- From: Jokke Heikkila <email@hidden>
- Date: Mon, 26 Jul 2010 13:55:39 +0300
On 26 July 2010 13:02, tahome izwah <email@hidden> wrote:
> ...not sure if this is the cause of your problems though...
I moved the line inside the loop, but as you suspected the problem still exist.
> are you
> sure that the format of the audio buffer is what you think it is? This
> could be another source of problems...
Spot on. I changed my ASBD from
desc.mBytesPerPacket = 4;
desc.mFramesPerPacket = 1;
desc.mBytesPerFrame = desc.mBytesPerPacket * desc.mFramesPerPacket;
desc.mChannelsPerFrame = 2;
desc.mBitsPerChannel = 16;
to
desc.mSampleRate = hardwareSampleRate;
desc.mFormatID = kAudioFormatLinearPCM;
desc.mFormatFlags = kAudioFormatFlagsCanonical;
desc.mBytesPerPacket = 2;
desc.mFramesPerPacket = 1;
desc.mBytesPerFrame = desc.mBytesPerPacket * desc.mFramesPerPacket;
desc.mChannelsPerFrame = 1;
desc.mBitsPerChannel = 16;
and its working now. Thanks! Now I just need to understand the ASBD better...
jokke
_______________________________________________
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