Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Watching LXTerminal for outputs (secrets)

by Anonymous Monk
on Feb 04, 2013 at 01:02 UTC ( #1016882=note: print w/replies, xml ) Need Help??


in reply to Watching LXTerminal for outputs

Hi :)

Look, my secrets  [mpg321], [ddg://site:perlmonks.org mpg321], [google://site:perlmonks.org mpg321], [metacpan://mpg321], [metacpan://mpg321], [cpan://mpg321], [href://http://search.cpan.org/search?query=mpg321&mode=all] mpg321, site:perlmonks.org mpg321, site:perlmonks.org mpg321, mpg321, mpg321, mpg321 , http://search.cpan.org/search?query=mpg321&mode=all

Perl/CGI Question - mod_perl IPC / Unix / mpg321..., Managing and sending signals to control MPG321, POE::Component::Player::Mpg123

Even more secrets  [man://mpg321] mpg321 "Remote control" mode. Useful for front-ends. Allows seeking and pausing of mp3 files. See README.remote (in /usr/share/doc/mpg321 on Debian and some other systems.)

Perl documentation documentation, Searching Perl Documentation, How to Read Perldocs, perlintro, Modern Perl, The Perl Monks Guide to the Monastery

Replies are listed 'Best First'.
Re^2: Watching LXTerminal for outputs (secrets)
by simonshout (Initiate) on Feb 04, 2013 at 01:26 UTC
    Thank you but I have read most of the documentation on this already. My script is within an infinite while loop and I cannot have mpg321 stalling the script. So I have a "system("mpg321 song.mp3 &"); line that lets it play in the background without stopping the script. I know that backticks will return a value but in my case I have to wait for the song to be finished playing so I am unsure how to pull these values from the terminal.

      Thank you but I have read most of the documentation on this already.

      What? Why not use the modules? Or view their source to see what they do?

      My script is within an infinite while loop and I cannot have mpg321 stalling the script.

      POE is all about infinite loops, use POE::Component::Player::Mpg123, it won't stall

      So I have a "system("mpg321 song.mp3 &")

      That probably won't work, you should use IPC::Open3,like Audio::Play::MPG123 does ( [jargon://UTSL), see also perlipc

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016882]
help
Chatterbox?
[james28909]: how come it is so easy for me to not care what others think while others will mute themselves because they are scare they will be called ignorant or stupid
[james28909]: do you relize how shrodinger felt when he was describing the quantum world? what about neils bohr?
[holli]: it's probably the autist in you. I am like that too, no fucks given about what others think about me

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-12-15 14:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?