From c279702ba2dc7c3d719cd68911cf7186aa3108e5 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Fri, 20 Nov 2020 11:38:41 -0800 Subject: [PATCH] Added more package tags and elaborated readme --- Cargo.toml | 2 ++ README.md | 32 +++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 52fcc8b..3c26050 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 diff --git a/README.md b/README.md index 54faad5..ad315b0 100644 --- a/README.md +++ b/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! \ No newline at end of file +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 = 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. \ No newline at end of file