• 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
Help with AudioFileGetProperty
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with AudioFileGetProperty


  • Subject: Help with AudioFileGetProperty
  • From: Gilbert Mackall <email@hidden>
  • Date: Mon, 24 Feb 2003 21:48:59 -0500

I am having a problem in understanding how the AudioFileGetProperty function is passed a pointer for the AudioStreamBasicDescription of the file I have selected. Below is the section of code I am having problems with. In reading AudioFile.h it states:

AudioFileGetProperty( AudioFileID inAudioFile,
AudioFilePropertyID inPropertyID,
UInt32 *ioDataSize,
void *outPropertyData);


My problem seems to be that I am not understanding, how to pass a void pointer.


- (IBAction)getFile:(id)sender
{

int result;
NSString *path;
FSRef *fileRef;
AudioFileID fileID;
UInt32 *theSize;
AudioStreamBasicDescription basicDescription;

NSArray *fileTypes = [NSArray arrayWithObjects:@"AIFF",@"AIFC",@"WAVE",@"wav",nil];

NSOpenPanel *oPanel = [NSOpenPanel openPanel];

[oPanel setAllowsMultipleSelection:NO];
result = [oPanel runModalForTypes:fileTypes];

if (result == NSOKButton)
{
NSArray *filesToOpen = [oPanel filenames];
path = [filesToOpen objectAtIndex:0];

printf("%s \n",[path cString]);

FSPathMakeRef([path fileSystemRepresentation],fileRef,NULL);
AudioFileOpen(fileRef, fsRdPerm, 0, fileID);
AudioFileGetProperty(fileID,kAudioFilePropertyDataFormat,theSize,basicDe scription);

}

}
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Help with AudioFileGetProperty
      • From: Tommy Braas <email@hidden>
  • Prev by Date: Re: Idle processing
  • Next by Date: Re: Help with AudioFileGetProperty
  • Previous by thread: Re: Idle processing
  • Next by thread: Re: Help with AudioFileGetProperty
  • Index(es):
    • Date
    • Thread