Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Media Player control.

Reply
Thread Tools

Media Player control.

 
 
Sree
Guest
Posts: n/a
 
      01-03-2006
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.

 
Reply With Quote
 
 
 
 
David Resnick
Guest
Posts: n/a
 
      01-03-2006

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

 
Reply With Quote
 
 
 
 
Christopher Benson-Manica
Guest
Posts: n/a
 
      01-03-2006
Sree <(E-Mail Removed)> wrote:

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


Only if you can do it with system(). If you need something else, you
need a different newsgroup.

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
 
Reply With Quote
 
Randy Howard
Guest
Posts: n/a
 
      01-03-2006
Sree wrote
(in article
<(E-Mail Removed) .com>):

> 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





 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 7, Media Player - Settings for Media Serving NOT being savedfor Home Group Tim Wells Windows 64bit 0 10-27-2009 01:26 PM
Media player / Media Center? Channelkat Windows 64bit 1 03-25-2008 04:50 PM
Windows Media Player - Download Media Info From Internet is Greyed Out Alan NZ Computing 3 02-27-2006 10:38 PM
How to show a Real Player or Media Player on my Web page? cyshao ASP .Net 1 04-12-2005 02:10 AM
mp3 player windows media player Bigfred Computer Support 1 10-28-2003 09:46 PM



Advertisments