Hi,
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 playing time, it gives some large value is it valid and how to get duration of music file.