Results 11 to 13 of 13
Originally Posted by Rubberman
Why would you want to run this non-blocking? The system will buffer keyboard input, so each call to read a character will get the next one ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-20-2009 #11Just Joined!
- Join Date
- Dec 2009
- Posts
- 8
- 12-20-2009 #12Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,142
Well, you could run $playcommand in the background, as in:
That will allow the script to grab the next character while playing the previous one.Code:#!/bin/bash while read -n1 char; do playcommand="aplay --duration=1 "$char".wav" $playcommand & done
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 12-20-2009 #13Just Joined!
- Join Date
- Dec 2009
- Posts
- 8
I will try this, thank you! my dev system is at work right now, so we'll see monday



Reply With Quote
