μsfx

Generate sound effects for your game in realtime.

CI Version Rust Documentation License

Example

```rust // Create a simple blip sound let mut sample = usfx::Sample::default();

// Use a sine wave oscillator sample.osc_type(usfx::OscillatorType::Sine);

// Set the envelope sample.envattack(0.02); sample.envdecay(0.05); sample.envsustain(0.2); sample.envrelease(0.5);

// Add some distortion sample.dis_crunch(0.5);

// Create a mixer so we can play the sound let mixer = usfx::Mixer::default();

// Play our sample mixer.play(sample);

// Plug our mixer into the audio device loop // ... mixer.generate(&mut audiodevicebuffer); ```

Special Thanks