• 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: kAudioDevicePropertyStreamFormat in AudioStreamSetProperty fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kAudioDevicePropertyStreamFormat in AudioStreamSetProperty fails


  • Subject: Re: kAudioDevicePropertyStreamFormat in AudioStreamSetProperty fails
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 4 Sep 2002 11:34:47 -0700

It's a bug.

On Wednesday, September 4, 2002, at 10:09 AM, Michael Thornburgh wrote:

this is mostly directed at the apple folks on the list -- i'd like to
know if the following is an on-purpose behavior change, or a bug that
i should report.

in 10.2, if i attempt to set the logical stream format of a stream
(kAudioDevicePropertyStreamFormat), the AudioStreamSetProperty call
will fail with "!siz". here is the code in question:


- (Boolean) setStreamDescription:(MTCoreAudioStreamDescription *)theDescription forSide:(MTCoreAudioStreamSide)theSide
{
OSStatus theStatus;
UInt32 theSize;
AudioStreamBasicDescription theASBasicDescription;
UInt32 theProperty;

if (theSide == kMTCoreAudioStreamPhysicalSide)
theProperty = kAudioStreamPropertyPhysicalFormat;
else
theProperty = kAudioDevicePropertyStreamFormat;


theASBasicDescription = [theDescription audioStreamBasicDescription];
theSize = sizeof(AudioStreamBasicDescription);

theStatus = AudioStreamSetProperty ( myStream, NULL, 0, theProperty, theSize, &theASBasicDescription );
if (theStatus != 0)
printf ("MTCoreAudioStream setStreamDescription:forSide: failed, got %4.4s\n", (char *)&theStatus );
return (theStatus == 0);
}


so, this will fail with !siz if theProperty is kAudioDevicePropertyStreamFormat, but
will succeed if it is kAudioStreamPropertyPhysicalFormat.

attempting to set the logical stream format using AudioDeviceSetProperty for a
channel and direction corresponding to the stream in question does work, however,
using the very same AudioStreamBasicDescription passed to AudioStreamSetProperty.

this feels like a bug (especially since it worked in 10.1) -- it seems like
if i'm not allowed to set the logical format for the stream, i should
get back a different error than "sizeof(AudioStreamBasicDescription) is
the wrong size for an AudioStreamBasicDescription". :)

is this a bug, or is this on purpose? is there now a different preferred way
to set the logical stream format?

-mike
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.



--

Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >kAudioDevicePropertyStreamFormat in AudioStreamSetProperty fails (From: Michael Thornburgh <email@hidden>)

  • Prev by Date: kAudioDevicePropertyStreamFormat in AudioStreamSetProperty fails
  • Next by Date: Audio Unit with Java?
  • Previous by thread: kAudioDevicePropertyStreamFormat in AudioStreamSetProperty fails
  • Next by thread: Audio Unit with Java?
  • Index(es):
    • Date
    • Thread