Sha256: 419e346f14d83ca40d4affffa0090729079304dd91bf5c50c36dabf16fc4b3a6
Contents?: true
Size: 435 Bytes
Versions: 3
Compression:
Stored size: 435 Bytes
Contents
require "coreaudio" # Select option name device as default output device def set_interface(name) if !name puts 'please enter audio output interface name.' return -1 end devs = CoreAudio.devices tgt = devs.find{|dev| dev.name.index(name)} if !tgt p "no match interface #{name}" return -1 end CoreAudio.set_default_output_device(tgt) p "select default output audio interface #{tgt.name}" end set_interface(ARGV[0])
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
coreaudio-0.0.12 | examples/set_def_out_dev.rb |
coreaudio-0.0.11 | examples/set_def_out_dev.rb |
coreaudio-0.0.10 | examples/set_def_out_dev.rb |