I want to get a length of a sound file.
In cocos2d I can get a duration of a sound file by using
static CDSoundEngine* soundEngine = nil;
static CDBufferManager bufferManager = nil;
int voiceID = ;
NSDictionarytempDict = [soundEngine playVoice:voiceID];
NSLog(“%f”, [tempDict objectForKey:@“kPlayTime”] floatValue]);
but I do not know how to do this with Cocos2dx.
Does anyone know how to get a duration of a sound file? Thank you.