in reply to pre-empt launched process
You need to read all the docs that come with sox and mpg123, to find the recommended syntax for interactive playing. To be honest, mplayer is probably easier to work with interactively. See Perl/Tk front-end to mplayer As far as mpg123 goes, this should show a trick
#!/usr/bin/perl use warnings; use strict; use Tk; # read README.remote in mpg123 sources # only works after mainwindow is closed ???? $|++; my $pid = open(FH,"| mpg123 -@ - "); print "$pid\n"; my $mw = new MainWindow; my $startbut = $mw->Button(-text =>'Start Play', -command => sub{ syswrite(FH, "1bb.mp3\n") ; })->pack; MainLoop;
|
|---|