module Bluejam
Common stuff for bjam and bmicjam
Written in 2020 by Francesco Palumbo phranz@subfc.net
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <creativecommons.org/publicdomain/zero/1.0/>.
Public Class Methods
enable_snd_aloop()
click to toggle source
# File lib/bluejam.rb, line 15 def enable_snd_aloop system 'sudo /sbin/modprobe snd-aloop' end
start_jam(hw, bd)
click to toggle source
# File lib/bluejam.rb, line 19 def start_jam hw, bd system "alsaloop -C hw:#{hw} -P bluealsa:DEV=#{bd} -U -l 1000 --period 200 -S 0 &>/dev/null" end
start_jam_mic(hw, bd)
click to toggle source
# File lib/bluejam.rb, line 23 def start_jam_mic hw, bd system "{ arecord --device=hw:#{hw} -f cd -t raw - | aplay -D bluealsa:DEV=#{bd},PROFILE=a2dp -f cd; } &>/dev/null" end