Media Player control.

Discussion in 'C Programming' started by Sree, Jan 3, 2006.

  1. Sree

    Sree Guest

    hello,

    I am blocked at a point in my code where i had to play a music
    file using a C program.
    Can i open and control windows media player using a C program?

    if i can, please help me how to do this.
    if i can't, tell me if there are any other ways of playing (for eg.,
    mp3) sound file
    using a C program.
     
    Sree, Jan 3, 2006
    #1
    1. Advertising

  2. Sree wrote:
    > hello,
    >
    > I am blocked at a point in my code where i had to play a music
    > file using a C program.
    > Can i open and control windows media player using a C program?
    >
    > if i can, please help me how to do this.
    > if i can't, tell me if there are any other ways of playing (for eg.,
    > mp3) sound file
    > using a C program.


    Hi Sree,

    Playing audio files isn't possible in portable "C". A few ideas:

    1) Ask in comp.os.ms-windows.programmer.win32. People may have
    good system specific advice there on how to play audio files.

    2) Construct a "system" command, as in
    #include <stdlib.h>
    ....
    system("some command that makes it play media player");
    ....
    -David
     
    David Resnick, Jan 3, 2006
    #2
    1. Advertising

  3. Christopher Benson-Manica, Jan 3, 2006
    #3
  4. Sree

    Randy Howard Guest

    Sree wrote
    (in article
    <>):

    > hello,
    >
    > I am blocked at a point in my code where i had to play a music
    > file using a C program.


    That is unfortunate.

    > Can i open and control windows media player using a C program?


    Maybe. It's not readily apparent what you can or can not do.
    However, odds are that you can do it using a program compiled
    with a C compiler, but using compiler and/or platform-specific
    extensions outside the scope of standard C.

    > if i can, please help me how to do this.


    The best assistance is probably to recommend you visit one of
    the Windows-specific programming newsgroups. Look at the groups
    provided by your NNTP host for one more specific to your
    intended program.


    --
    Randy Howard (2reply remove FOOBAR)
    "The power of accurate observation is called cynicism by those
    who have not got it." - George Bernard Shaw
     
    Randy Howard, Jan 3, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cyshao
    Replies:
    1
    Views:
    3,335
    Steve C. Orr [MVP, MCSD]
    Apr 12, 2005
  2. steven robinson
    Replies:
    0
    Views:
    666
    steven robinson
    Nov 9, 2003
  3. ary
    Replies:
    1
    Views:
    1,092
    =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
    Nov 28, 2006
  4. HY Tech
    Replies:
    0
    Views:
    628
    HY Tech
    Sep 7, 2003
  5. Guest
    Replies:
    1
    Views:
    111
    Phil Tomson
    Jan 27, 2004
Loading...

Share This Page