only look for ALSA on linux systems

This commit is contained in:
Spencer Russell 2020-01-30 11:54:16 -05:00
parent 9d780e4950
commit b18b9bdcae

View file

@ -315,6 +315,7 @@ function suppress_err(dofunc::Function)
end
function __init__()
if Sys.islinux()
envkey = "ALSA_CONFIG_DIR"
if envkey keys(ENV)
searchdirs = ["/usr/share/alsa",
@ -341,6 +342,7 @@ function __init__()
confdir = searchdirs[confdir_idx]
ENV[envkey] = confdir
end
end
# initialize PortAudio on module load. libportaudio prints a bunch of
# junk to STDOUT on initialization, so we swallow it.
# TODO: actually check the junk to make sure there's nothing in there we