Fork me on GitHub
#boot
<
2018-10-30
>
clojureslack13:10:49

I am trying to get audible notifications but I don't hear any sounds. My task looks like this:

(deftask build []
  (comp (notify "-a")
        (cljs)))
I don't see any warnings or error messages if I run boot -vv build but there is no sound played. This is on Fedora 28. Am I missing something obvious?

alandipert16:10:16

@clojureslack try (notify :audible true) instead of (notify "-a")

alandipert16:10:45

(task arguments are handled differently in in clojure code)

clojureslack16:10:09

@alandipert That didn't seem to work.

alandipert16:10:30

does (boot (notify :audible true)) in a repl work?

alandipert16:10:38

or, at a command line, boot notify -a ?

clojureslack16:10:35

boot notify -a at the command line just returns without appearing to do anything.

clojureslack16:10:41

-v does send a notification.

alandipert16:10:57

hm, sounds like a problem with sound at some lower level then

alandipert17:10:10

are you able to play audio from cli with aplay?

alandipert17:10:39

and is sound otherwise working on your machine?

alandipert17:10:34

another thing to try is code like this in a repl, to see if you can get mp3s to play manually with javazoom https://github.com/boot-clj/boot/blob/master/boot/worker/src/boot/notify.clj#L18-L30

clojureslack17:10:49

I can play mp3s with mpg123 and sound also works normally otherwise. I will look at the java code and see if I can get it to work

clojureslack17:10:25

Curious. When I run that function it gives an error Cannot create AudioDevice

clojureslack18:10:28

@alandipert I eventually found that I had no sound in any java apps. I think I was using a headless JDK. I switched to java-9-openjdk and reinstalled boot and I have sound now. Thank you for the help.