Simple Prog. w/ AU (Audio Units)
Simple Prog. w/ AU (Audio Units)
- Subject: Simple Prog. w/ AU (Audio Units)
- From: PatA <email@hidden>
- Date: Mon, 21 Mar 2005 13:52:25 -0500
A pre-Newbie, refreshing my C memory in preparation for learning Cocoa.
I found some code at the Apple Dev site that looks like it might lead
to something I need. My music keyboard, K2000 has lists of sounds,
etc. inside that I want to simply make a listing of. There are
programs available to do that, but my K2000 software has been upgraded
in such a way as they don't work, e.g. new sounds, etc.
The following is mostly just a copy and paste job from the Apple site.
Is it close enough to compiling that someone would care to comment
constructively? Obviously don't know how to declare the variables.
#import <Cocoa/Cocoa.h>
main()
{
UInt32theSize;
theStatus = AudioHardwareGetPropertyInfo (
kAudioHardwarePropertyDevices, &theSize, NULL );
theNumberDevices = theSize / sizeof(AudioDeviceID);
theDeviceList = (AudioDeviceID*) malloc (theNumberDevices *
sizeof(AudioDeviceID) );
UInt32 theSize = theNumberDevices *sizeof(AudioDeviceID);
theStatus = AudioHardwareGetProperty
(kAudioHardwarePropertyDevices, &theSize, theDeviceList );
printf (theDeviceList, AudioDeviceID "\n");
return(0);
}
The following commands were used:
% cc -Wall -o AUtest AUtest.m
% ./AUtest
Thanks,
Pat
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden