• 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: Simple Prog. w/ AU (Audio Units)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Prog. w/ AU (Audio Units)


  • Subject: Re: Simple Prog. w/ AU (Audio Units)
  • From: Pete Yandell <email@hidden>
  • Date: Tue, 22 Mar 2005 08:22:52 +1100

Pat,

I'm not going to try correcting your code, because I'm not even sure what it's supposed to do. From your description, you want to retrieve a list of available patches from your K2000, but that has nothing to do with AudioUnits, audio devices, or their properties. The code you've supplied, apart from having a bunch of obvious problems, seems to be trying to retrieve a list of audio devices?

Whatever you're trying to do, this would probably be more appropriate on the CoreAudio-API list rather than the Cocoa-dev list.

Pete Yandell

On 22/03/2005, at 5:52 AM, PatA wrote:

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


_______________________________________________ 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
References: 
 >Simple Prog. w/ AU (Audio Units) (From: PatA <email@hidden>)

  • Prev by Date: Re: Access iTunes Playlists / tracks via Cocoa
  • Next by Date: Programatically creating/saving an NSImage;
  • Previous by thread: Simple Prog. w/ AU (Audio Units)
  • Next by thread: Passing data between Applescript and ObjC
  • Index(es):
    • Date
    • Thread