I'm trying to use a file player audio unit (kAudioUnitSubType_AudioFilePlayer
) to play multiple files (not at the same time, of course). That's on iOS.
So I've successfully opened the files and stored their details in an array of AudioFileID
's that I set to the audio unit using kAudioUnitProperty_ScheduledFileIDs
. Now I would like to define 2 ScheduledAudioFileRegion
's, one per file, and used them with the file player...
But I can't seem to find out:
- How to set the
kAudioUnitProperty_ScheduledFileRegion
property to store these 2 regions (actually, how to define the index of each region)? - How to trigger the playback of a specific region.. My guess is that the
kAudioTimeStampSampleTimeValid
parameter should enable this but how to define which region you want to play?
Maybe I'm just plain wrong about the way I should use this audio unit, but documentation is very difficult to get and I haven't found any example showing the playback of 2 regions on the same player! Thanks in advance.