boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
cullan 2018-10-30T13:59:49.009900Z

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?

2018-10-30T16:32:16.010700Z

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

2018-10-30T16:32:45.011200Z

(task arguments are handled differently in in clojure code)

cullan 2018-10-30T16:47:09.012600Z

@alandipert That didn't seem to work.

2018-10-30T16:47:30.012900Z

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

2018-10-30T16:47:38.013200Z

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

cullan 2018-10-30T16:49:35.013800Z

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

cullan 2018-10-30T16:50:41.014100Z

-v does send a notification.

2018-10-30T16:59:57.014400Z

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

2018-10-30T17:00:10.014800Z

are you able to play audio from cli with aplay?

2018-10-30T17:00:39.015100Z

and is sound otherwise working on your machine?

2018-10-30T17:01:34.015600Z

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

cullan 2018-10-30T17:12:49.016500Z

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

cullan 2018-10-30T17:21:25.017100Z

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

cullan 2018-10-30T18:38:28.018Z

@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.

👍 1