mirror of
https://github.com/iluvcapra/bwavfile.git
synced 2025-12-31 08:50:44 +00:00
Added more package tags and elaborated readme
This commit is contained in:
@@ -8,6 +8,8 @@ license-file = "LICENSE"
|
||||
description = "Rust Wave File Reader/Writer with Broadcast-WAV, MBWF and RF64 Support"
|
||||
homepage = "https://github.com/iluvcapra/bwavfile"
|
||||
readme = "README.md"
|
||||
categories = ["multimedia::audio", "parsing"]
|
||||
keywords = ["audio", "broadcast", "multimedia","filmmaking","ebu","itu","smpte"]
|
||||
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
32
README.md
32
README.md
@@ -1,4 +1,34 @@
|
||||
# bwavfile
|
||||
Rust Wave File Reader/Writer with Broadcast-WAV, MBWF and RF64 Support
|
||||
|
||||
This is currently a work-in-progress!
|
||||
This is currently a work-in-progress!
|
||||
|
||||
## Use
|
||||
|
||||
```rust
|
||||
|
||||
let path = "tests/media/ff_silence.wav";
|
||||
|
||||
let mut w = WaveReader::open(path)?;
|
||||
let length = w.frame_length()?;
|
||||
let format = w.format()?;
|
||||
|
||||
let bext = w.broadcast_extension()?;
|
||||
println!("Description field: {}", &bext.description);
|
||||
println!("Originator field: {}", &bext.originator);
|
||||
|
||||
let frame_reader = w.audio_frame_reader()?;
|
||||
|
||||
let mut buffer: Vec<i32> = w.create_frame_buffer();
|
||||
while( frame_reader.read_integer_frame(&mut buffer) > 0) {
|
||||
println!("Read frames {:?}", &buffer);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Note on Testing
|
||||
|
||||
All of the media for the integration tests is committed to the respository
|
||||
in either zipped form or is created by ffmpeg. Before you can run tests,
|
||||
you need to `cd` into the `tests` directory and run the `create_test_media.sh`
|
||||
script.
|
||||
Reference in New Issue
Block a user