Created
November 2, 2013 10:54
-
-
Save katsyoshi/7277744 to your computer and use it in GitHub Desktop.
macでmikutterの音を鳴らすプラグイン
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module.new do | |
if command_exist? "afplay" | |
Plugin::create(:mac_sound).add_event(:play_sound){ |filename, &stop| | |
SerialThread.new { | |
bg_system("afplay", filename) if FileTest.exist?(filename) } | |
stop.call | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment