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

Re: eliminating deprecated functions


  • Subject: Re: eliminating deprecated functions
  • From: Jeff Moore <email@hidden>
  • Date: Sat, 16 Feb 2008 15:05:12 -0800

First off, you should probably be using AUHAL to do what you are doing. In fact, the sample code in /Developer/Examples/CoreAudio/ SimpleSDK/DefaultOutputUnit is probably exactly what you are looking for.

At any rate, on Leopeard AudioDeviceAddIOProc and AudioDeviceRemoveIOProc were deprecated in favor of AudioDeviceCreateIOProcID and AudioDeviceDestroyIOProcID.


On Feb 16, 2008, at 2:46 AM, Roland Silver wrote:

I've been trying unsuccessfully for some time to find or create a project that will simply emit a 440 Hz tone through the Mac speakers using the AudioQueue framework.

The only success I've had is to use James McCartney's obsolescent project Sinewave_demo as a model; it indeed emits a 440 Hz tone -- but when built has two warnings:

	AudioDeviceAddIOProc and AudioDeviceRemoveIOProc are deprecated.

Can someone tell me how to fix this problem?



	err = AudioDeviceAddIOProc(device, appIOProc, (void *) def);

		warning: AudioDeviceAddIOProc is deprecated

...

	err = AudioDeviceRemoveIOProc(device, appIOProc);

		warning: AudioDeviceRemoveIOProc is deprecated

where

	AudioDeviceID	device;

	typedef struct {
 	   @defs(Sinewave);
	}  sinewavedef;
	sinewavedef *def;

	def = (sinewavedef *)self;

and appIOProc is the callback.


I didn't want to make this email longer by attaching the entire Sinewave_demo project (without the "build" folder), but I'll be glad to do so if that will help.



--

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: 
 >eliminating deprecated functions (From: Roland Silver <email@hidden>)

  • Prev by Date: eliminating deprecated functions
  • Next by Date: Re: rookie cocoa AU question
  • Previous by thread: eliminating deprecated functions
  • Next by thread: AUIntrumentBase and CPU load
  • Index(es):
    • Date
    • Thread