Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Sep 30, 2023
1 parent 8e22755 commit 0e65d47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oddio"
version = "0.7.0"
version = "0.7.1"
authors = ["Benjamin Saunders <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Oddio is a game-oriented audio library that is:
### Example

```rust
let (mut scene_handle, scene) = oddio::split(oddio::SpatialScene::new());
let (mut scene_handle, mut scene) = oddio::SpatialScene::new();

// In audio callback:
let out_frames = oddio::frame_stereo(data);
oddio::run(&scene, output_sample_rate, out_frames);
oddio::run(&mut scene, output_sample_rate, out_frames);

// In game logic:
let frames = oddio::FramesSignal::from(oddio::Frames::from_slice(sample_rate, &frames));
let mut handle = scene_handle.control::<oddio::SpatialScene, _>()
let mut handle = scene_handle
.play(frames, oddio::SpatialOptions { position, velocity, ..Default::default() });

// When position/velocity changes:
handle.control::<oddio::Spatial<_>, _>().set_motion(position, velocity, false);
handle.set_motion(position, velocity, false);
```

## License
Expand Down

0 comments on commit 0e65d47

Please sign in to comment.