December 27th, 2012, 11:30 AM
Direct Show Timer
Im coding a music player and I want the timer to stop when the music stops.
I got a static text with the lenght of the song. (the static text shows the position of the song in seconds....like 00:00:01,00:00:02..and it increments as the songs plays.....)
Ive messed around with WaitForCompletion but no luck
oh yeah..im using DIRECTSHOW and COM for the music player
here is a link to a picture so you know what im saying
(as you see..the static text has more time then the acual song lenght.)
here is soem of the acual code that i tried
so how do i get the song time to stop?
here is some code that doesnt work
but it only goes to 1 second and stops
sprintf(time2, "%02u:%02u:%02u", (timeElapsed/3600)%60, (timeElapsed/60)%60, timeElapsed%60);
hr = pEvent->WaitForCompletion(0, &evCode);
long EvCode = 0;
bool b = pEvent->WaitForCompletion(0, &EvCode);
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.