【文件属性】:
文件名称:sounder:在 Mac 上播放声音
文件大小:8KB
文件格式:ZIP
更新时间:2021-07-06 01:57:42
Ruby
发声器
在 Mac 上播放声音
安装
将此行添加到应用程序的 Gemfile 中:
gem 'sounder'
然后执行:
$ bundle
或者自己安装:
$ gem install sounder
用法
Sounder::System.set_volume 70 # 0-100
Sounder.play File.expand_path('../support/mysound.m4a', __FILE__)
sound = Sounder::Sound.new "/path/to/audio/file"
sound.play
my_group = Sounder::SoundGroup.new(
:sound_one => File.expand_path('../../lib/support/sound1.m4a', __FILE__),
"sound_two
【文件预览】:
sounder-master
----Rakefile(28B)
----Gemfile(92B)
----spec()
--------sounder()
--------sounder_spec.rb(251B)
--------spec_helper.rb(18B)
----sounder.gemspec(906B)
----.gitignore(154B)
----lib()
--------sounder()
--------sounder.rb(299B)
----README.md(1KB)
----LICENSE.txt(1KB)