[Gambas-user] MP3

Héctor Fernández López trorrr at ...397...
Sun May 30 18:37:44 CEST 2004


El Domingo, 30 de Mayo de 2004 18:23, Héctor Fernández López escribió:
> El Martes, 25 de Mayo de 2004 18:43, Benoit Minisini escribió:
> > On Tuesday 25 May 2004 14:21, Tim Hanschen wrote:
> > > I read a bit docu... there is a remote interface for mpg321
> > > available... you can set mpg321 in an interactive mode. That means that
> > > you can type in a command for stop, ff or rew, but I do not know how to
> > > send these "keys" from gambas... I tried to write it to stdout, but
> > > that did not work.. ;-(
> > >
> > > - Tim -
> >
> > Something like that:
> >
> > DIM hProcess AS Process
> >
> > EXEC [ "mpg321", "options" ] FOR READ WRITE AS #hProcess
> >
> > ...
> >
> > PRINT #hProcess, "The keys";
> >
> >
> > PUBLIC SUB Process_Read()
> >
> >   DIM sRead AS String
> >
> >   READ #hProcess, sRead, -256
> >
> >   PRINT "mpg321 sent: "; sRead
> >
> > END
> >
> >
> > Look at the examples that use external programs, like the video player
> > that uses mplayer and send it commands.
> >
> > Regards,
>
> I am using mpg321 in remote control mode.  When i load a song,
> Process_Error raises giving me:  (each line is each sStr returned)
>
>
> m
> c
> o
> p
>
> w
> a
> r
> n
> ing: user defined signal handler found for SIG_PIPE, overriding
>
>
> and after less than a second the song stops playing until i close the app.
> Then mpg321 continues playing and i must close it with KILL.  Is there
> someone using mpg321 on interactive mode from gambas without this error?
>
I should clarify that if i use:
EXEC [ "mpg321", "song.mp3" ] FOR READ WRITE AS $hProcess
it returns the same message as above before any other string sent by the 
process.  So, why mpg321 stops playing?




More information about the User mailing list