From d702d4e70088907142dcecf35d96a66b4cb54ad9 Mon Sep 17 00:00:00 2001 From: Jeff Fessler Date: Sun, 13 Feb 2022 22:25:37 -0500 Subject: [PATCH] Fix lilyplay example --- examples/lilyplay.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/lilyplay.jl b/examples/lilyplay.jl index a9904f6..ae04469 100644 --- a/examples/lilyplay.jl +++ b/examples/lilyplay.jl @@ -1,13 +1,19 @@ +#= +This example synthesizes a bit of Beethoven's Ode to Joy chorus +where the note sequence is stored in the concise LilyPond text format: +http://lilypond.org/ +=# + using Distributed, PortAudio # Modified from Jiahao Chen's example in the obsolete AudioIO module. -# Will use first output device found in system's listing or DEFAULTDEVICE if set below +# Use first output device found in system's listing or DEFAULTDEVICE if set below. const DEFAULTDEVICE = -1 function paudio() devs = PortAudio.devices() if DEFAULTDEVICE < 0 - devnum = findfirst(x -> x.maxoutchans > 0, devs) + devnum = findfirst(x -> x.output_bounds.max_channels > 0, devs) (devnum == nothing) && error("No output device for audio found") else devnum = DEFAULTDEVICE + 1