Thread: cdaudio

  1. #1
    Unregistered
    Guest

    Question cdaudio

    How can I control the CD Audio? I looked on msdn, and there's alot of information, but i can't get it to work. can someone show me some code. i just need it to open and play, i'll probably figure out the rest if you can show me that. thanks.

  2. #2
    Unregistered
    Guest

    Question

    by the way, if it helps, i was looking at mciSendCommand, i don't know if that helps, but i can't figure it out. thanks again.

  3. #3
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125
    Hi.

    I havent dont a lot with the MCI device but a while back i did make a cd player. I used mciSendString for most of my code.

    int PlayCd()
    {
    mciSendString("open cdaudio",NULL,NULL,NULL);
    mciSendString("set cdaudio time format tmsf",NULL,NULL,NULL);
    mciSendString("play cdaudio",NULL,NULL,NULL);
    return 0;

    }

    void StopCd()
    {
    mciSendString("stop cdaudio",NULL,NULL,NULL);
    mciSendString("eject cdaudio",NULL,NULL,NULL);
    mciSendString("close cdaudio",NULL,NULL,NULL);
    }

    void PauseCd()
    {
    mciSendString("pause cdaudio",NULL,NULL,NULL);
    }

    i set up these in void's so you could see what each one did. that code should work, but i am typing in a hurry so excuse any errors.

    you also have to link with winmm.lib
    check out google they have a few good tutorials on the MCI device. hope this helped you out a little

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MCI CD Player
    By soutine in forum Windows Programming
    Replies: 0
    Last Post: 11-02-2001, 05:03 PM