Skip to content

Commit a625b48

Browse files
committed
Merge branch 'candidate-v1' into HEAD
2 parents 319845a + d17c6ba commit a625b48

File tree

5 files changed

+46
-76
lines changed

5 files changed

+46
-76
lines changed

Cargo.lock

+13-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bwavfile"
3-
version = "0.9.3"
3+
version = "1.0.0"
44
authors = ["Jamie Hardt <[email protected]>"]
55
edition = "2018"
66
license = "MIT"

README.md

+28-56
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,44 @@
44
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/iluvcapra/bwavfile/Rust)](https://github.com/iluvcapra/bwavfile/actions?query=workflow%3ARust)
55

66
# bwavfile
7-
Rust Wave File Reader/Writer with Broadcast-WAV, MBWF and RF64 Support
7+
Wave File Reader/Writer library in Rust, with Broadcast-WAV, MBWF and RF64 Support
88

9-
### Features
9+
## Features
1010

11-
This is currently a work-in-progress! However many features presently work:
11+
__bwavfile__ provides a reader `WaveReader` and writer type `WaveWriter` for
12+
reading and creating new audio files respectively.
1213

13-
| Feature |Read |Write|
14-
|---------------------------------------|:---:|:-----:|
15-
| Standard .wav files | ☑️ | ☑️ |
16-
| Transparent promotion to RF64/BW64 | ☑️ | ☑️ |
17-
| Unified interface for regular and extended Wave format | ☑️ | ☑️ |
18-
| Channel/speaker map metadata | ☑️ | ☑️ |
19-
| Ambisonic B-format metadata | ☑️ | ☑️ |
20-
| EBU Broadcast-WAVE metadata | ☑️ | ☑️ |
21-
| Basic iXML/ADM metadata | ☑️ | ☑️ |
22-
| Enhanced iXML metadata support | | |
23-
| ADM `chna` channel metadata | | |
24-
| Broadcast-WAVE Level overview `levl` metadata | | |
25-
| Cue list metadata | ☑️ | |
26-
| Sampler and instrument metadata | | |
27-
| Enhanced Wave file form validation | ☑️ | |
14+
`WaveReader` and `WaveWriter` support:
15+
* A unified interface for standard RIFF and RF64/BW64 64-bit Wave files.
16+
* When using `WaveWriter`, wave files are transparently upgraded from RIFF
17+
to RF64 when required.
18+
* Unpacked reading and writing of Integer PCM and IEEE float audio data
19+
formats.
20+
* A unified interface for standard `WaveFormat` and extended `WaveFormatEx`
21+
wave data format specification.
22+
* Multichannel, surround, and ambisonic audio data description including
23+
surround channel maps, ADM `AudioTrackFormat`, `AudioChannelFormatRef` and
24+
`AudioPackRef` data structures.
25+
* Broadcast-Wave metdata extension, including long description, originator
26+
information, SMPTE UMID and coding history.
27+
* Reading and writing of embedded iXML and axml/ADM metadata.
28+
* Reading and writing of timed cues and and timed cue region.
2829

30+
### Feature Roadmap
2931

30-
## Use Examples
32+
Some features that may be included in the future include:
33+
* Broadcast-Wave `levl` waveform overview data reading and writing.
34+
* Sampler and Instrument mentadata.
3135

32-
### Examples Directory
3336

34-
Check out the [examples](examples) directory for some practical use cases:
37+
## Use Examples
3538

3639
* [blits](examples/blits.rs) shows how to use `WaveWriter` to create a new
3740
file with BLITS alignment tones.
38-
39-
### Reading Audio Frames From a File
40-
41-
```rust
42-
43-
use bwavfile::WaveReader;
44-
let mut r = WaveReader::open("tests/media/ff_silence.wav").unwrap();
45-
46-
let format = r.format().unwrap();
47-
assert_eq!(format.sample_rate, 44100);
48-
assert_eq!(format.channel_count, 1);
49-
50-
let mut buffer = format.create_frame_buffer();
51-
let mut frame_reader = r.audio_frame_reader().unwrap();
52-
53-
let read = frame_reader.read_integer_frame(&mut buffer).unwrap();
54-
55-
assert_eq!(buffer, [0i32]);
56-
assert_eq!(read, 1);
57-
```
58-
59-
### Accessing Channel Descriptions
60-
61-
```rust
62-
use bwavfile::{WaveReader, ChannelMask};
63-
64-
let mut f = WaveReader::open("tests/media/pt_24bit_51.wav").unwrap();
65-
66-
let chans = f.channels().unwrap();
67-
assert_eq!(chans[0].index, 0);
68-
assert_eq!(chans[0].speaker, ChannelMask::FrontLeft);
69-
assert_eq!(chans[3].index, 3);
70-
assert_eq!(chans[3].speaker, ChannelMask::LowFrequency);
71-
assert_eq!(chans[4].speaker, ChannelMask::BackLeft);
72-
```
41+
* [wave-inter](examples/wave-inter.rs) uses `WaveReader` and `WaveWriter` to
42+
interleave several input Wave files into a single polyphonic Wave file.
43+
* [wave-deinter](examples/wave-deinter.rs) uses `WaveReader` and `WaveWriter`
44+
to de-interleave an input Wave file into several monoarual Wave files.
7345

7446
## Note on Testing
7547

src/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ Apps we test against:
3535
[github]: https://github.com/iluvcapra/bwavfile
3636
*/
3737

38-
// #![feature(external_doc)]
39-
40-
// #[doc(include="../README.md")]
41-
// #[cfg(doctest)]
42-
// pub struct ReadmeDoctests;
43-
4438
extern crate encoding;
4539
extern crate byteorder;
4640
extern crate uuid;

src/wavereader.rs

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ impl<R: Read + Seek> AudioFrameReader<R> {
120120
Ok( 0 )
121121
}
122122
}
123+
124+
pub fn read_float_frame(&mut self, buffer:&mut [f32]) -> Result<u64, Error> {
125+
todo!()
126+
}
123127
}
124128

125129
/// Wave, Broadcast-WAV and RF64/BW64 parser/reader.

0 commit comments

Comments
 (0)