From 60af2f43ff36a0c976ed04fecca6209f8369b26a Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Sun, 6 Dec 2020 12:16:49 -0800 Subject: [PATCH] Update README.md --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 83b2727..a8e99dc 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,21 @@ This is currently a work-in-progress! However many features presently work: assert_eq!(read, 1); ``` +### Accessing Channel Descriptions + +```rust + use bwavfile::{WaveReader, ChannelMask}; + + let mut f = WaveReader::open("tests/media/pt_24bit_51.wav").unwrap(); + + let chans = f.channels().unwrap(); + assert_eq!(chans[0].index, 0); + assert_eq!(chans[0].speaker, ChannelMask::FrontLeft); + assert_eq!(chans[3].index, 3); + assert_eq!(chans[3].speaker, ChannelMask::LowFrequency); + assert_eq!(chans[4].speaker, ChannelMask::BackLeft); +``` + ## Note on Testing All of the media for the integration tests is committed to the respository