• 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: correcting calls to deprecated functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: correcting calls to deprecated functions


  • Subject: Re: correcting calls to deprecated functions
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 21 Feb 2008 11:19:16 -0800

When you first posed this question, I specifically recommended that you not use the HAL and use an instance of the default output AU. In fact from your description of what you were trying to do, it sounded like you'd find pretty much everything you'd need in the DefaultOutputUnit sample code project (/Developer/Examples/CoreAudio/ SimpleSDK/DefaultOutputUnit).


On Feb 21, 2008, at 11:07 AM, Roland Silver wrote:

You (katsura) suggested changing my call to the deprecated function AudioDeviceAddIOProc as follows:

change

	status = AudioDeviceAddIOProc( device, InputIOProc, NULL );

to

	status =

	AudioDeviceCreateIOProcID( device, InputIOProc, NULL, [arg4] );

Question: What do I need to put in for [arg4]?

To quote from the headerdoc:
/*!
@function AudioDeviceCreateIOProcID
@abstract Creates an AudioDeviceIOProcID from an AudioDeviceIOProc and a client data
pointer.
@discussion AudioDeviceIOProcIDs allow for the client to register the same function pointer
with a device multiple times
@param inDevice
The AudioDevice to register the IOProc with.
@param inProc
The AudioDeviceIOProc to register.
@param inClientData
A pointer to client data that is passed back to the IOProc when it is
called.
@param outIOProcID
The newly created AudioDeviceIOProcID.
@result An OSStatus indicating success or failure.
*/


The fourth argument returns the newly created AudioDeviceIOProcID that you need so that your subsequent calls to AudioDeviceStart(), AudioDeviceStop(), AudioDeviceDestroyIOProcID(), etc. will work.

I also need to change

	err = AudioDeviceRemoveIOProc(device, appIOProc);

Is this correct?

	err = AudioDeviceDestroyIOProcID(device, &appIOProc);

Not in the least. You pass in the AudioDeviceIOProcID you got back from AudioDeviceCreateIOProcID().


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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: 
 >correcting calls to deprecated functions (From: Roland Silver <email@hidden>)

  • Prev by Date: correcting calls to deprecated functions
  • Next by Date: Re: rookie cocoa AU question
  • Previous by thread: correcting calls to deprecated functions
  • Next by thread: Speaker Audio when Headphone connected?
  • Index(es):
    • Date
    • Thread