ref: 9e4e9ca14b0b980de13420acbe479e133af045a9
parent: 6676de057b1a4dda62ffb475a5762f90b0c55a25
author: Chris Bagwell <chris@cnpbagwell.com>
date: Mon Jan 16 07:50:32 EST 2012
Let user run as play.exe/rec.exe on windows. Previously, it only supported enabling play/rec mode if user copied/linked sox.exe to play.exe/rec.exe and ran without the .EXE extension name.
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,8 @@
volume control. (cbagwell)
o Fix but when specifying OSX coreaudio device name. Would only
search for first 3 devices. (cbagwell)
+ o Support enabling play/rec mode when user invokes sox as either
+ play or play.exe on windows. (cbagwell)
Effects:
--- a/src/sox.c
+++ b/src/sox.c
@@ -2833,8 +2833,16 @@
if (lsx_strends(myname, "play"))
sox_mode = sox_play;
+#if defined(__CYGWIN__) || defined(__MINGW32__)
+ else if (lsx_strends(myname, "play.exe"))
+ sox_mode = sox_play;
+#endif
else if (lsx_strends(myname, "rec"))
sox_mode = sox_rec;
+#if defined(__CYGWIN__) || defined(__MINGW32__)
+ else if (lsx_strends(myname, "rec.exe"))
+ sox_mode = sox_play;
+#endif
else if (lsx_strends(myname, "soxi"))
sox_mode = sox_soxi;