Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

convert ExtAudioFileRef type to AudioFileID type in iOS

I've been using ExtAudioFile Services and I want to use an AudioFile Service which requires an AudioFileID parameter. This parameter corresponds to ExtAudioFileRef used in ExtAudioFile Services. How do I convert from ExtAudioFileRef type to AudioFileID type?

like image 262
Namratha Avatar asked Feb 08 '11 09:02

Namratha


1 Answers

I know this one is old and answered, but I just noticed it and thought I'll leave a correct answer here for future reference

AudioFileID audioFile;
UInt32 dataSize = sizeof(AudioFileID);
ExtAudioFileGetProperty(extAudioFile, kExtAudioFileProperty_AudioFile, &dataSize, &audioFile);
like image 92
Mayjak Avatar answered Sep 21 '22 14:09

Mayjak