Thread: Mci_tms_frame

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    2

    Mci_tms_frame

    Hello

    I need help using the macro MCI_TMSF_FRAME. I trying to write an application that will play CD's I would like to display the track of the CD playing using:
    SetDlgItemText(hDlg,IDC_STATIC_TRACK, ?????argument 3))

    MCI_TMSF_FRAME returns a BYTE : What does this mean and how do I use this macro with SetDlgItemText();




    Platform SDK: Windows Multimedia

    MCI_TMSF_FRAME
    The MCI_TMSF_FRAME macro retrieves the frames component from a parameter containing packed tracks/minutes/seconds/frames (TMSF) information.

    BYTE MCI_TMSF_FRAME(
    DWORD dwTMSF
    );
    Parameters
    dwTMSF
    Time in TMSF format.
    Return Values
    Returns the frames component of the specified TMSF information.

    Remarks
    Time in TMSF format is expressed as a DWORD value with the least significant byte containing tracks, the next least significant byte containing minutes, the next least significant byte containing seconds, and the most significant byte containing frames.

    The MCI_TMSF_FRAME macro is defined as follows:

    #define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf) >> 24))

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Looks like the macro you are looking at returns the last of the four components, FRAMES. I think in CD audio there are 75frames / sec.

    Try MCI_TMSF_TRACK and get the return as a char. Use a funtion like sprintf() to get it into your string for SetDlgItemText()

    You could also try type casting an int and using SetDlgItemInt()
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed