Offset error
Hi! I found that you are adding offset twice in your code. The sample is working because offset is 0 for current audio format. Not working with aac. In class TDAudioStreamer, line 68 memcpy((char *)(self.audioQueueBuffer->mAudioData + self.fillPosition), (const char *)(data + packetDescription.mStartOffset), packetDescription.mDataByteSize); and line 46: memcpy((char *)(self.audioQueueBuffer->mAudioData + self.fillPosition), (const char *)(data + offset), length);
This offset is already added in class TDAudioFileStream, line 85 [self.delegate audioFileStream:self didReceiveData:(const void *)(packets + packetOffset) length:packetSize packetDescription:(AudioStreamPacketDescription)packetDescriptions[i]];
does that affect the function of the app?
Yes, this is a bug. I used TDAudioInputStreamer to play aac stream. Was not working. Fixed by removing superfluous "add offset".
Have you forked the repo with that edit?
no
mind pushing that edit?
ok
Created pull request. Tell me if I did smth wrong.
Pull request is correct. But i tested The Code and The song is still not in synch when playing on multple devices. Weird.
Still not playing m4a, in the fork, there some way to do it?
Thanks in advance
Could you give me some pointers about how to play aac playback work? I tried your branch but had no luck. Also, is m4a and aac the same thing we are mentioning? Because Apple uses m4a as the container of encoded aac.