Sorry for the delay, I've been away from the code a bit.
I followed your advice, it makes sense. My test audio file is 2400 packets long. So when I slide my slider I can just set my packet to read to the appropriate value.
The problem is that I crash now!
So I tried setting my my current packet to, say 700 packets, in on the FIRST time I play the audio file. Crash city!
I first set this up by calling:
startingPacketNumber = inNumPackets;
in my AudioQueueObject.
Then I do the normal setting up of the 3 buffers, calling my playbackCallback on each to fill the buffer.
int current = [player startingPacketNumber];
// current = 700, not 0
AudioFileReadPackets (
[player audioFileID],
NO,
&numBytes,
[player packetDescriptions],
current,
&numPackets,
bufferReference->mAudioData
);
AudioFileReadPackets crashes on the first time it is called.
I'm at a loss here. I appreciate any help. I can show more code but the above should look familiar, it is pretty much straight from the audio sample.