mirror of
https://github.com/RustAudio/rodio
synced 2024-12-04 01:19:23 +00:00
Add Contributing guide and Integration Test guidelines
- Link to CONTRIBUTING.md in project root - New Integration Tests section: - Avoid sound output in tests - Tips for testing audio sources - Suggest examples for audible features - Note challenges in automated audio testing
This commit is contained in:
parent
b6a90594aa
commit
d57e410ca7
2 changed files with 19 additions and 0 deletions
|
@ -51,6 +51,21 @@ src/:
|
|||
- Rust's robust type system reduces the need for extensive unit testing compared to dynamically typed languages
|
||||
- Run tests: `cargo test`
|
||||
|
||||
### Integration Tests
|
||||
|
||||
When possible, add integration tests for your new features. Keep in mind:
|
||||
|
||||
- Typically, these tests should not produce actual sound output (i.e., avoid using `Sink` or `Stream`).
|
||||
- For new audio sources:
|
||||
- Verify that samples have changed from their initial state.
|
||||
- Check if samples are non-zero where appropriate.
|
||||
- Look for expected patterns or characteristics in the audio data.
|
||||
- Be aware that many aspects of audio processing are challenging to verify automatically.
|
||||
- For features requiring audible verification:
|
||||
- Create an example in the `examples/` directory that demonstrates the functionality.
|
||||
- These examples can produce sound for manual testing.
|
||||
- Document the expected behavior in the example's comments.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Add inline documentation to all public items
|
||||
|
|
|
@ -24,6 +24,10 @@ See [the docs](https://docs.rs/rodio/latest/rodio/#alternative-decoder-backends)
|
|||
|
||||
Rodio uses `cpal` to send audio to the OS for playback. On Linux `cpal` needs the ALSA development files. These are provided as part of the libasound2-dev package on Debian and Ubuntu distributions and alsa-lib-devel on Fedora.
|
||||
|
||||
# Contributing
|
||||
|
||||
For information on how to contribute to this project, please see our [Contributing Guide](https://github.com/RustAudio/rodio/CONTRIBUTING.md).
|
||||
|
||||
## License
|
||||
[License]: #license
|
||||
|
||||
|
|
Loading…
Reference in a new issue