[Gambas-user] MP3

Benoit Minisini gambas at ...1...
Tue May 25 18:43:31 CEST 2004


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,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list