From 743e4e35260fa8f69e4ca5d37f30194b6c7d7d86 Mon Sep 17 00:00:00 2001 From: tomaka Date: Wed, 1 Nov 2017 10:15:17 +0100 Subject: [PATCH] Fix #177 (#179) --- src/alsa/mod.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/alsa/mod.rs b/src/alsa/mod.rs index adbb8a6..393f313 100644 --- a/src/alsa/mod.rs +++ b/src/alsa/mod.rs @@ -325,8 +325,16 @@ impl EventLoop { pub fn new() -> EventLoop { let pending_trigger = Trigger::new(); + let initial_descriptors = vec![ + libc::pollfd { + fd: pending_trigger.read_fd(), + events: libc::POLLIN, + revents: 0, + }, + ]; + let run_context = Mutex::new(RunContext { - descriptors: Vec::new(), // TODO: clearify in doc initial value not necessary + descriptors: initial_descriptors, voices: Vec::new(), });