Click here to Skip to main content
15,921,531 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
ok im trying to make a cd Audio player with MCI but im stuck with the trackbar which has to progress with the audio track, i cant seem to know how to get the current value using MCI.
or even time it to the track...
Posted

I'm confused. Can't you just call GetCurentMilisecond() every n units of time?

/ravi
 
Share this answer
 
Comments
LostCoderX 12-Oct-12 16:16pm    
Well i'll try that and reply tomorrow,its late now and im going to explode from trying to do this...but question
public bool IsPlaying()
{
Pcommand = "status MediaFile mode";
error = mciSendString(Pcommand, returnData, 128, IntPtr.Zero);
if (returnData.Length == 7 &&
returnData.ToString().Substring(0, 7) == "playing")
return true;
else
return false;
}

why 7?
See this[^] CP article, esp. the section "Song length and current position".

/ravi
 
Share this answer
 
Comments
LostCoderX 12-Oct-12 14:10pm    
thanks..but i checked that already..as i said i need to use mciSendString

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900