Struct uni_snd::snd::SoundDriver[][src]

pub struct SoundDriver<T: Send + 'static> { /* fields omitted */ }

This is the sound API that allows you to send events to your generator.

Methods

impl<T: Send + 'static> SoundDriver<T>
[src]

After calling SoundDriver::new, you can call this function to see if the audio initialization was a success.

Initialize the sound device and provide the generator to the driver.

Send an event to the generator

This function should be called every frame. It's only needed on web target to fill the output sound buffer.

This will call the generator init function. On native target, it starts the sound thread and the audio loop. On web target, only the SoundDriver::frame function produces sound.

Auto Trait Implementations

impl<T> Send for SoundDriver<T>

impl<T> !Sync for SoundDriver<T>