<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -49,7 +49,7 @@ BANNER
           
   opts.on(&quot;-d&quot;, &quot;--doom&quot;,
           &quot;Special Doom Edition.&quot;,
-          &quot;Only for Mac.&quot;) { |OPTIONS[:doom]| OPTIONS[:doom] = true }
+          &quot;Only for Mac/Cygwin.&quot;) { |OPTIONS[:doom]| OPTIONS[:doom] = true }
   
   opts.on(&quot;-b&quot;, &quot;--buuf&quot;,
           &quot;Special Buuf Images.&quot;,
@@ -65,11 +65,11 @@ BANNER
           
   opts.on(&quot;--success-sound=PATH&quot;, String,
           &quot;Sound to play on success.&quot;, 
-          &quot;Only for Mac&quot;) { |OPTIONS[:sound][:success]| }
+          &quot;Only for Mac/Cygwin.&quot;) { |OPTIONS[:sound][:success]| }
           
   opts.on(&quot;--failure-sound=PATH&quot;, String,
           &quot;Sound to play on success.&quot;,
-          &quot;Only for Mac&quot;) { |OPTIONS[:sound][:failure]| }          
+          &quot;Only for Mac/Cygwin.&quot;) { |OPTIONS[:sound][:failure]| }          
 
   opts.on(&quot;-h&quot;, &quot;--help&quot;,
           &quot;Show this help message.&quot;) { puts opts; exit }
@@ -103,4 +103,4 @@ f.write(&quot;FAILURE_SOUND = '#{OPTIONS[:sound][:failure]}'\n&quot;)
 f.close
 
 puts &quot;\nAs from now all tests will be notified automatically.&quot;
-puts &quot;&quot; # a blank line
\ No newline at end of file
+puts &quot;&quot; # a blank line</diff>
      <filename>bin/an-install</filename>
    </modified>
    <modified>
      <diff>@@ -65,7 +65,7 @@ module AutotestNotification
       when /darwin/
         Mac.notify(title, msg, img, total, failures, priority)
       when /cygwin/
-        Cygwin.notify(title, msg, img)
+        Cygwin.notify(title, msg, img, total, failures)
       when /mswin/
         Windows.notify(title, msg, img)
       end</diff>
      <filename>lib/autotest_notification.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,34 @@
 module AutotestNotification
   class Cygwin
+    @last_test_failed = false
+
     class &lt;&lt; self
-      def notify(title, msg, img)
+      def notify(title, msg, img, total = 1, failures = 0)
         img = get_image_path(img).strip
         system &quot;sncmd /m '#{title}' '#{msg}' '#{img}' /t #{Config.expiration_in_seconds}&quot;
+        play(SUCCESS_SOUND) unless SUCCESS_SOUND.empty? or failures &gt; 0
+        play(FAILURE_SOUND) unless FAILURE_SOUND.empty? or failures == 0
+        say(total, failures) if DOOM_EDITION
       end
       
       def get_image_path(img)
         `cygpath -m #{img}`
       end
+
+      def say(total, failures)
+        if failures &gt; 0
+          Doom.play_sound(total, failures)
+          @last_test_failed = true
+        elsif @last_test_failed
+          Doom.play_sound(total, failures)
+          @last_test_failed = false
+        end
+      end
+
+      def play(sound_file)
+        system &quot;cp #{sound_file} /dev/dsp&quot;
+      end
+
     end
   end
 end</diff>
      <filename>lib/autotest_notification/cygwin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,8 @@ module AutotestNotification
           `#{File.expand_path(File.dirname(__FILE__) + &quot;/../../bin/&quot;)}/playsound #{sound_file}`
         when /linux/
           system(&quot;/usr/bin/mplayer #{sound_file} &gt; /dev/null 2&gt; /dev/null&quot;)
+        when /cygwin/
+          system &quot;cp #{sound_file} /dev/dsp&quot;
         end
       end
 </diff>
      <filename>lib/autotest_notification/doom.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9db71d2488fb6f72c3f3550b88e7b0e8a671243d</id>
    </parent>
  </parents>
  <author>
    <name>Jesus Lopez</name>
    <email>jesus@jesusla.com</email>
  </author>
  <url>http://github.com/carlosbrando/autotest-notification/commit/d5c1066cdb1b4f2cfcdfd3caa4c1fdc037e027b2</url>
  <id>d5c1066cdb1b4f2cfcdfd3caa4c1fdc037e027b2</id>
  <committed-date>2009-03-18T18:58:19-07:00</committed-date>
  <authored-date>2009-03-18T18:57:47-07:00</authored-date>
  <message>Support sound playback in Cygwin.

Enables success and failure sound playback as well as &quot;Doom Edition&quot;
on Cygwin platforms.

Plays sound by copying wav file to /dev/dsp.</message>
  <tree>fc6fdd6380e7204e45098f86963c02725dda915d</tree>
  <committer>
    <name>Jesus Lopez</name>
    <email>jesus@jesusla.com</email>
  </committer>
</commit>
