Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Watching LXTerminal for outputs (secrets)

by simonshout (Initiate)
on Feb 04, 2013 at 01:26 UTC ( #1016884=note: print w/replies, xml ) Need Help??


in reply to Re: Watching LXTerminal for outputs (secrets)
in thread Watching LXTerminal for outputs

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.
  • Comment on Re^2: Watching LXTerminal for outputs (secrets)

Replies are listed 'Best First'.
Re^3: Watching LXTerminal for outputs (secrets)
by Anonymous Monk on Feb 04, 2013 at 02:33 UTC

    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://1016884]
help
Chatterbox?
[dazz]: Hi I have grabbed an image from an IP camera with Image::Grab. I then want to pass that image object to a subroutine where I do a read-only test on the image with Image:Magick.
[dazz]: How do I pass an image object to a subroutine and then apply a Image::Magick a read-only method to the image object???
[dazz]: Also, I want to use Image::Magick to annotate and composite (not in a sub). How do I take a Image::Grab object and apply Image::Magick write methods to it??
[dazz]: At present, I am saving the Image::Grab image to disk, then creating a new Image::Magick object that reads the disk file.
[dazz]: .
[choroba]: Discipulus Sounds interesting. Any pictures of the puppets or paintings?

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-03-27 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (317 votes). Check out past polls.