Struct ears::Recorder [] [src]

pub struct Recorder { /* fields omitted */ }

Record audio

This class provide easy audio recording using. The Recorder allow the user to record sound, then save it in a file, or create a SoundData object to play the recorded sound in the same program. A special context, RecordContext is needed to create the Recorder object. The Recorder work in it's own task.

Examples

use ears::Recorder;

fn main() -> () {
    // Create a new context to record audio
    let context = ears::init_in().unwrap();
    // Create the recorder
    let mut recorder = Recorder::new(context);
    // Start to record something
    recorder.start();

    // Do some other stuff here

    // Stop the recorder
    recorder.stop();
    // Then store the recorded data in a file
    recorder.save_to_file("hello_file");
}

Methods

impl Recorder
[src]

[src]

Create a new audio recorder

[src]

[src]

[src]

Trait Implementations

Auto Trait Implementations

impl Send for Recorder

impl !Sync for Recorder