Forums
Bad TALDSAudioPlayer->DurationTime return value - Printable Version

+- Forums (http://mitov.com/forum)
+-- Forum: VCL Components (/forum-6.html)
+--- Forum: AudioLab (/forum-14.html)
+--- Thread: Bad TALDSAudioPlayer->DurationTime return value (/thread-128.html)



Bad TALDSAudioPlayer->DurationTime return value - SleepCZ - 03-08-2012 01:07 AM

Hi, i got a problem. When I use fuction AudioPlayer->DurationTime, with some songs - +-50% I got bad return value. Problem is, that one file (3:57min) returns correct value, but other one (both are MP3) returns wrong value... Does somebody have any idea where can be problem? Thanks so much for tips.

Code:
__int64 Time;
TALDSAudioPlayer->FileName = "FILE.MP3";
TALDSAudioPlayer->Open();
Time = TALDSAudioPlayer->DurationTime();
TALDSAudioPlayer->Close();



RE: Bad TALDSAudioPlayer->DurationTime return value - Dave - 03-08-2012 01:42 AM

Hi! How do you check/verify the time you get?

Regards,
Dave


RE: Bad TALDSAudioPlayer->DurationTime return value - SleepCZ - 03-08-2012 02:54 AM

What do you mean? I dont know what are you asking about?


RE: Bad TALDSAudioPlayer->DurationTime return value - Dave - 03-08-2012 05:35 AM

Well you get the time in 100 nanoseconds, and because i couldn't recreate this i wondered how you calculate the time to minutes and seconds. Maybe that's the problem instead of the component.

Dave


RE: Bad TALDSAudioPlayer->DurationTime return value - SleepCZ - 03-08-2012 06:18 AM

Yeah... I get it... I just divided by 10E7 -> On seconds... But its not point of problem... I was trying many things and is not in convert-to-min-sec function... When i tried to ShowMessage() it i get bad value (3mins - returned +- 180sec, then try other 3min song again ShowMessage() it and returned totally bad value - +- 500sec) ... its simply returning bad value. Have no idea where is problem... Sometimes works perfectly, sometimes totally wrong.


RE: Bad TALDSAudioPlayer->DurationTime return value - SleepCZ - 03-10-2012 11:07 PM

So do you have any idea why this fucntion returns bad value? Open file, call DurationTime(), Close file()... sometimes work sometimes not, I will be really grateful for any tips.


RE: Bad TALDSAudioPlayer->DurationTime return value - Dave - 03-11-2012 04:17 AM

Probably a DS issue but without further details i can't, haven't seen it fail yet. Perhaps PM/mail me the mp3 (or a part of it) or mail it to mr.Mitov.

Regards,
Dave