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.
|