# PortAudio.jl does not work well with Gtk.jl

**URL:** https://discourse.julialang.org/t/portaudio-jl-does-not-work-well-with-gtk-jl/47003
**Category:** General Usage
**Tags:** question
**Created:** [September 21, 2020, 1:02pm UTC](https://discourse.julialang.org/t/portaudio-jl-does-not-work-well-with-gtk-jl/47003 "2020-09-21T13:02:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kogad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kogad/32/18629_2.png) [@kogad](https://discourse.julialang.org/u/kogad)
#### Post date: [September 21, 2020, 1:02pm UTC](https://discourse.julialang.org/t/portaudio-jl-does-not-work-well-with-gtk-jl/47003/1 "2020-09-21T13:02:50Z")

</div>

Hi, I am trying to develop a gui app for real time audio processing using `PortAudio.jl` and `Gtk.jl`. The following code is for just recording and playing back.

```julia
using PortAudio
# using Gtk

stream = PortAudioStream(1, 2)

println("recording")
sig_in = read(stream, 51200) 

println("playing back")
write(stream, sig_in)

```

However, `using Gtk` makes recording and playback take too much longer than it should. Recorded data looks fine, but it’s breaking up when played back.  
How do I fix this problem?

---

<div class="post-metadata">

### Author: ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)
#### Post date: [September 21, 2020, 1:21pm UTC](https://discourse.julialang.org/t/portaudio-jl-does-not-work-well-with-gtk-jl/47003/2 "2020-09-21T13:21:51Z")

</div>

Make sure you have the most recent version with these changes:  
[https://github.com/JuliaGraphics/Gtk.jl/pull/521](https://github.com/JuliaGraphics/Gtk.jl/pull/521)  
If that’s still laggy, you may want to take a look at other GUIs…  
Makie could work for simple stuff 😉
