How to check current time and duration in AudioQueue
问题 How to get total time duration of music in audioQueue. I am using NSTimeInterval AQPlayer::getCurrentTime() { NSTimeInterval timeInterval = 0.0; AudioQueueTimelineRef timeLine; OSStatus status = AudioQueueCreateTimeline(mQueue, &timeLine); if(status == noErr) { AudioTimeStamp timeStamp; AudioQueueGetCurrentTime(mQueue, timeLine, &timeStamp, NULL); timeInterval = timeStamp.mSampleTime; } return timeInterval; } AudioQueueGetCurrentTime(mQueue, timeLine, &timeStamp, NULL); for getting current