In Objective-C we filled out the ScheduledAudioFileRegion struct like so:
ScheduledAudioFileRegion playRegion;
playRegion.mTimeStamp.mFlags = kAudioTimeStampSampleTimeValid;
playRegion.mTimeStamp.mSampleTime = 0;
playRegion.mCompletionProc = NULL;
playRegion.mCompletionProcUserData = NULL;
playRegion.mAudioFile = audioFileID;
playRegion.mLoopCount = 0;
playRegion.mStartFrame = 0;
playRegion.mFramesToPlay = -1;
with the mFramesToPlay
set to -1 to tell it to play the entire file.
Swift will not allow me to set a UInt32 to -1. So how do I tell it to play the entire file?
I know this is not the only place that a negative value for a UInt32 was used as a flag in Obj-C, but it's the first time I've run into it.