Re: Getting distorted sound from AU
Re: Getting distorted sound from AU
- Subject: Re: Getting distorted sound from AU
- From: tahome izwah <email@hidden>
- Date: Mon, 26 Jul 2010 16:38:51 +0200
Glad to hear you got it working!
Cheers
--th
2010/7/26 Jokke Heikkila <email@hidden>:
> 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