fn event(&mut self, event: Event<'_>) {
        match event {
            Event::Record(microphone) => {
                //println!("Recording");
                self.buffer.extend(microphone);
                if self.buffer.len() >= 48_000 * 10 {
                    write_pcm(&self.buffer);
                    std::process::exit(0);
                }
            }
        }
    }
/// Event loop.  Return false to stop program.
Event loop.  Return false to stop program.
Event loop . Return false to stop program .
fn event(&mut self, event: Event<'_>) {
        match event {
            Event::Record(microphone) => {
                //println!("Recording");
                self.buffer.extend(microphone);
                if self.buffer.len() >= 48_000 * 10 {
                    write_pcm(&self.buffer);
                    std::process::exit(0);
                }
            }
        }
    }
fn event ( & mut self , event : Event < ' _ > ) { match event { Event :: Record ( microphone ) => { //println!("Recording"); self . buffer . extend ( microphone ) ; if self . buffer . len ( ) >= 48_000 * 10 { write_pcm ( & self . buffer ) ; std :: process :: exit ( 0 ) ; } } } }
Event loop.
Event loop .
&mut self
event
Event<'_>