| 1 | package Plagger::Plugin::Notify::Audio::MSWin32; | ||
| 2 | use strict; | ||
| 3 | use base qw( Plagger::Plugin::Notify::Audio); | ||
| 4 | |||
| 5 | use Win32::Sound; | ||
| 6 | |||
| 7 | sub play { | ||
| 8 | my($self, $filename, $length) = @_; | ||
| 9 | $filename ||= "SystemExclamation"; | ||
| 10 | $length ||= 3; | ||
| 11 | |||
| 12 | Win32::Sound::Play($filename, SND_ASYNC); | ||
| 13 | sleep $length; | ||
| 14 | } | ||
| 15 | |||
| 16 | 1; |