• 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: Mystery errror on AudioDeviceSetProperty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mystery errror on AudioDeviceSetProperty


  • Subject: Re: Mystery errror on AudioDeviceSetProperty
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 7 Nov 2003 15:08:50 -0800

0xE00002C2, or kIOReturnBadArgument, is an IOKit error that the driver returned. It is defined in <IOKit/IOReturn.h>, but you have to shave off the first "E" to read it properly.

I'm not sure why you are getting that particular error for the code snippet you show below, but you are most definitely not calling AudioDeviceGetPropertyInfo() correctly. The last two arguments are definitely incorrect. The second to last argument is supposed to be a UInt32* as opposed to a size_t and the last argument is supposed to be a Boolean* as opposed to an ASBD*.

On Nov 7, 2003, at 6:44 AM, Louis Sinclair wrote:

Hello all,

I'm having a problem trying to set audio device parameters.
For instance, trying to set the sample rate of the default
output device to 44100 fails with a result of -536870206
( E00002C2 hex). I'm not able to find a reference to this
error code any where.

The specific code I'm using is:

OSStatus status = 0;
AudioStreamBasicDescription format;
memset(&format,0,sizeof(AudioStreamBasicDescription));
format.mSampleRate = 44100.0;
status = AudioDeviceGetPropertyInfo(defaultInputDevice,0,false,
kAudioDevicePropertyStreamFormat,
sizeof(AudioStreamBasicDescription),&format);

The mystery is that code that used to work no longer works. I
applied the automatic update to 10.3.8 recently, and am wondering
if that could have anything to do with it. Audio in general seems
to work ok on the system, so it seems it must be a coding issue,
other than the fact that it was working before.

I get the same error whether coding directly to Core Audio, or when
using the Core Audio version of PortAudio.

Has anyone experienced any thing like this?

Also, where's the best info on Core Audio programming. The best
thing I've found from Apple is the CoreAudio.pdf document.

--

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: 
 >Mystery errror on AudioDeviceSetProperty (From: Louis Sinclair <email@hidden>)

  • Prev by Date: Re: MusicDevice implementation
  • Next by Date: Re: QuickTime Musical Instrument, DLSSynth bug on QT 6.4 and Panther?
  • Previous by thread: Re: Mystery errror on AudioDeviceSetProperty
  • Next by thread: QuickTime Musical Instrument, DLSSynth bug on QT 6.4 and Panther?
  • Index(es):
    • Date
    • Thread