Re: Playing song...!



Hey all, thanx for the response regarding playing song.

fine, Actually i wanted to play a song just by calling XMMX. how can i write a function using system calls and how to attach to the button??

is that simple system call will work or i have to copy the full source code in to my program and so on?

and any one tell me using gtk+ if i develop any GUI, will it be helpful for me in the future??? Meaning, whats the future of gtk+ (gui) developers?? i feel, bcas this is very new to the market.

thanx in advance,
dumieel.

From: Andreas Scherf <scherfa web de>
To: "Ananth A" <dumieel hotmail com>
CC: "GTK-List" <gtk-list gnome org>
Subject: Re: Playing song...!
Date: Mon, 15 Oct 2001 21:55:38 +0200

Am Montag, 15. Oktober 2001 07:54 schrieben Sie:
> Hey, I am dumieel. I really feel its good to be in this group. I would like > to say my hearty thanx to the person who is generated this group and allthe
> active members.
>
> I started working on gtk a few weeks back. I have a few questions.
>
> 1. As soon as I click on my button, I want to play a song which is selected
> from the list box.  Say the file name is song1.mp3.
> 2. So when I select this song1.mp3, I wanted to play the song in my
> application.
>
You have to send an event to a function wich should do something like the
following :

---
gchar *gs_call[3];

rc = fork ();
    if (rc == -1) {
      g_warning ("Can´t fork ()");
    } else if (rc == 0) {
      gs_call[0] = "mpg123";
      gs_call[1] = song_name;
      gs_call[2] = 0;
      execvp (gs_call[0], gs_call);
  }
---
So this is a normal c function which should do the job.
Hope this helps ..

Andreas Scherf
--
ICQ: 52910964
scherfa fh-trier de
scherfa web de
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]