473,660 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Media Player control.

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.

Jan 3 '06 #1
3 2666

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.program mer.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

Jan 3 '06 #2
Sree <sr************ ***@gmail.com> 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)cybers pace.org | don't, I need to know. Flames welcome.
Jan 3 '06 #3
Sree wrote
(in article
<11************ **********@o13g 2000cwo.googleg roups.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

Jan 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1181
by: Pedro | last post by:
Hello, I'm having a problem with the Media Player control. Sometimes, when I use the value from currentPositionString property of the Media PLayer Control I get a different value from the one that is presented in the Media Player control. Does anyone knows how the Media Player Control presents the time? Best regards, Pedro
1
8911
by: Anise | last post by:
I have a question concerning embedding a windows media player into a web application in .net.. I download Windows Media Player 10 and its SDK On the .ascx page I placed a windows media player object from the toolbox and all the sites i read say when "Adding the Windows Media Player control from the Toolbox also adds references to two libraries created by Visual
1
7886
by: Stephen Adam | last post by:
Hi there, Have spent a while trying to find out how to connect to Windows Media Player through COM. Unfortunately there doesnt seem to be much stuff about it on the web. What I need to do is create a simple console application which will be able to find out what the values of a currently playing tack. I've downloaded the Windows Media player SDK which come with some IDL and
3
19912
by: rmorvay | last post by:
I wrote a quick app to play music and I am having difficulty connecting a slider control to the Windows Media Player control. Here is my difficulty. I need to set the sliders min and max properties and utilize its value property to manage the volume of the Windows Media Player control. I am not sure which property on the windows media control I am suppose to manipulate. I tried to use the following: mp.volume = vsVol.value in the sliders...
3
5182
by: UJ | last post by:
I have a .avi file that uses the Divx codec. If I load it with windows media player program it works fine. If I load it using my control in a program, it doesn't display. Over standard media files work fine so it's this particular file. Do I have to do anything when the file uses a non-included codec? How can I tell what Codec it's using? TIA - Jeff.
4
6282
by: hzgt9b | last post by:
Using VS 2003, VB.NET and/or ASP.NET 2.0, BACKGROUND I have a window forms based application that contains a TreeView control and a WebBroswer (AxSHDocVw.AxWebBrowser) control. The TreeView is populated with nodes that when clicked play an audio clip from specified local or web URL and navigate the browser control to a specified local or web URL. Audio playback uses as hidden media player object AxWMPLib.AxWindowsMediaPlayer).
0
1894
by: dongarbage | last post by:
Hi there, I've created a user control to put in a web page. I'd like to add a windows media player control to the user control that I've created. But, for some reason, the user control does not load when I add the windows media player control to it. Is the issue that I did not specify the HTML correctly? I have embedded a windows media player in a web page, and had to specify the CLSID for media player, but in this case, I'd like to...
2
3273
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to quicktime or windows meida player depending on which plugin was found. after the plug in is found a iframe with the right player is created. here is the code. for some reason In IE the plug in doesnt work and in fire fox it crashes <!DOCTYPE html...
5
2630
by: Fred Chateau | last post by:
I am currently using an Object element of type "application/x-mplayer2" to create a media player in ASP.NET 3.5, and was wondering if there is a better way to instantiate WMP in a browser. I'm hoping to find something with better cross-browser compatibility. I looked at System.Windows.Media.MediaPlayer in PresentationCore.dll but I'm assuming that is used for Windows Forms (WPF). I'm also looking at the Silverlight 2.0 MediaElement as a...
0
8341
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8539
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8630
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2759
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.