Skip to content

Commit

Permalink
Merge pull request keroserene#3 from mrpants/master
Browse files Browse the repository at this point in the history
Adding cygwin audio support
  • Loading branch information
keroserene committed Apr 3, 2013
2 parents 1428a83 + a822483 commit 7c9eca0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Here is the clandestine command you can give to your friends :)
![rickroll in xterm](http://i.imgur.com/ZAsQWtP.png)
![rickroll in mac](http://i.imgur.com/yDLaZna.png)

This has been tested on arch, debian and mac (so far).
There is currently no sound in cygwin, but that is to be fixed.
This has been tested on arch, debian, mac and cygwin (so far).
To enable sound in cygwin, install the **sox** package.

For the record: It is not actually a good idea to make a habit of:
"curl $(random_script_from_the_internets) | bash"
Expand Down
7 changes: 7 additions & 0 deletions roll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ elif hash aplay 2>/dev/null; then
# On Linux if the aplay command is available, stream raw sound.
obtainium $bean/roll.s16 | aplay -q -f S16_LE -r 8000 &
audpid=$!
elif hash play 2>/dev/null; then
# On Cygwin, if the play command is available (via the sox package), pre-fetch
# compressed audio.
echo "downloading audio..."
obtainium $bean/roll.gsm.wav >/tmp/roll.gsm.wav
play -q /tmp/roll.gsm.wav &
audpid=$!
fi

# Sync FPS to reality as best as possible. Mac's freebsd version of date cannot
Expand Down

0 comments on commit 7c9eca0

Please sign in to comment.