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. Advertisements

  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. Advertisements

  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. Advertisements

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. Mike

    media player 10

    Mike, Mar 2, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    696
  2. Oscar Thornell

    Detect version of media player

    Oscar Thornell, Dec 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    625
    Nicholas Paldino [.NET/C# MVP]
    Dec 2, 2003
  3. =?Utf-8?B?am9obmcxNDky?=

    Windows media player and asp.net

    =?Utf-8?B?am9obmcxNDky?=, Mar 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    539
    Alvin Bruney [MVP]
    Mar 4, 2004
  4. cyshao
    Replies:
    1
    Views:
    3,590
    Steve C. Orr [MVP, MCSD]
    Apr 12, 2005
  5. steven robinson
    Replies:
    0
    Views:
    816
    steven robinson
    Nov 9, 2003
  6. ary
    Replies:
    1
    Views:
    1,253
    =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
    Nov 28, 2006
  7. HY Tech
    Replies:
    0
    Views:
    772
    HY Tech
    Sep 7, 2003
  8. Guest
    Replies:
    1
    Views:
    159
    Phil Tomson
    Jan 27, 2004
Loading...