Re: Playing song...!



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



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