-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
The following code works as expected for me in a fresh Julia session if the first line is commented out.
#using Gtk # uncommenting this causes problems with wavplay!?
using WAV: wavplay
S = 8192
x = cos.(2pi*(1:S÷2)*440/S)
y = cos.(2pi*(1:S÷2)*660/S)
wavplay(x, S)
wavplay(y, S)
But uncommenting the first line causes intermittent problems, usually that the first tone x
is never played.
I then have to restart Julia and comment out the first line for it to work again.
I am using Julia v1.6.4 with WAV v1.1.1 and Gtk v1.1.9, under MacOS Mojave 10.14.6.
I suspect that the issue is that both Gtk and WAV use a ccall
with some type of run loop, like
WAV.jl/src/wavplay-audioqueue.jl
Line 374 in 0dc24f6
CFRunLoopRun() |
and perhaps those interfere with each other, but I am surprised that merely adding
using Gkt
without calling any Gtk functions would cause such interference.
I am preparing to teach a course where students make a simply GUI-based synthesizer using Gtk buttons that produce tones when clicked, so I very much hope there is a solution to this.
Metadata
Metadata
Assignees
Labels
No labels