• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't have AudioServer properly get the list of available formats
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't have AudioServer properly get the list of available formats


  • Subject: Re: Can't have AudioServer properly get the list of available formats
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 12 Mar 2013 11:52:27 -0700

If the 88200 format is the third format that you are returning, shouldn't the index of the array you are writing into be 2 and not 1?

--

Jeff Moore
Core Audio
Apple



On Mar 12, 2013, at 11:44 AM, Eric Gorouben <email@hidden> wrote:

> I'm implementing the kAudioStreamPropertyAvailablePhysicalFormats and kAudioStreamPropertyAvailableVirtualFormats properties. For some reason, this doesn't seem to work.
> As an experiment, I modified my source to use the SA_Plugin values (the 2 44.1 & 48k formats). No problem.
> I then modified it to have 3 formats (i.e. change the data size, and add a third format with a 88200 Hz sample rate
> 			if(theNumberItemsToFetch > 2)
> 			{
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mSampleRate = 88200.0;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mFormatID = kAudioFormatLinearPCM;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mBytesPerPacket = 4;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mFramesPerPacket = 1;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mBytesPerFrame = 4;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mChannelsPerFrame = 2;
> 				((AudioStreamRangedDescription*)outData)[1].mFormat.mBitsPerChannel = 16;
> 				((AudioStreamRangedDescription*)outData)[1].mSampleRateRange.mMinimum = 88200.0;
> 				((AudioStreamRangedDescription*)outData)[1].mSampleRateRange.mMaximum = 88200.0;
> 			}
>
> ).
> I get completely wrong results and AudioServer seems lost and gives the applications inconsistent values.
> I'm stuck on this problem. What did I miss?


 _______________________________________________
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

References: 
 >Debugging an AudioServer plugin (From: Eric Gorouben <email@hidden>)
 >Re: Debugging an AudioServer plugin (From: Jeff Moore <email@hidden>)
 >Re: Debugging an AudioServer plugin (From: Eric Gorouben <email@hidden>)
 >Re: Debugging an AudioServer plugin (From: Jeff Moore <email@hidden>)
 >Re: Debugging an AudioServer plugin (From: Jeff Moore <email@hidden>)
 >Can't have AudioServer properly get the list of available formats (From: Eric Gorouben <email@hidden>)

  • Prev by Date: Can't have AudioServer properly get the list of available formats
  • Next by Date: Re: Can't have AudioServer properly get the list of available formats
  • Previous by thread: Can't have AudioServer properly get the list of available formats
  • Next by thread: Re: Can't have AudioServer properly get the list of available formats
  • Index(es):
    • Date
    • Thread