https://github.com/unrust/uni-snd
Unrust native/wasm compatibility layer for sound output
https://github.com/unrust/uni-snd
sound wasm
Last synced: about 1 year ago
JSON representation
Unrust native/wasm compatibility layer for sound output
- Host: GitHub
- URL: https://github.com/unrust/uni-snd
- Owner: unrust
- License: apache-2.0
- Created: 2018-08-04T09:33:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-10-14T16:54:17.000Z (over 3 years ago)
- Last Synced: 2025-02-28T09:01:38.218Z (over 1 year ago)
- Topics: sound, wasm
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# unrust / uni-snd
[](https://travis-ci.org/unrust/uni-snd)
[](https://docs.rs/uni-snd)
[](https://crates.io/crates/uni-snd)
This library is a part of [Unrust](https://github.com/unrust/unrust), a pure rust native/wasm game engine.
This library provides a low level native/wasm compatibility layer for following components :
* Sound output
## Usage
`uni-snd = "0.2.*"`
See oscillator example.
## Build
### As web app (wasm32-unknown-unknown)
Install wasm32 target :
```
rustup target install wasm32-unknown-unknown
```
Install [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/)
and [npm](https://www.npmjs.com/get-npm)
Compile the demo with
```
wasm-pack build examples
```
This creates a wasm package in examples/pkg
Run the demo with
```
cd www
npm install
npm run start
```
Open your browser at http://localhost:8080/
### As desktop app (native-opengl)
```
cargo run --example oscillator --release
```
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.