Skip to content

Commit 7053a97

Browse files
authored
Merge pull request #845 from RustAudio/upgrade_guide
update upgrade guide
2 parents 8a85169 + 1112fa1 commit 7053a97

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5656
- `Sink` is now `Player`
5757
- `SpatialSink` is now `SpatialPlayer`
5858
- `StreamError` is now `OsSinkError`
59-
- `SamplesBuffer::new(1, 16000, samples)` would now look like `SamplesBuffer::new(nz!(1), nz!(16000), samples)` using the new `nz!` macro
59+
- `SamplesBuffer::new(1, 16000, samples)` would now look like `SamplesBuffer::new(nz!(1), nz!(16000), samples)` using the new `nz!` macro
6060
- `output_to_wav` renamed to `wav_to_file` and now takes ownership of the `Source`.
6161
- `Blue` noise generator uses uniform instead of Gaussian noise for better performance.
6262
- `Gaussian` noise generator has standard deviation of 0.6 for perceptual equivalence.

UPGRADE.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,29 @@ guide are very welcome!
55
The list below only contains required code changes. For a complete list of
66
changes and new features, see [CHANGELOG.md](CHANGELOG.md).
77

8-
# rodio 0.21.1 to current GitHub version
8+
# rodio 0.22 to current github version
9+
Nothing yet!
910

10-
No changes are required.
11+
# rodio 0.21.1 to 0.22
12+
- _Sink_ terms are replaced with _Player_ and _Stream_ terms replaced
13+
with _Sink_. This is a simple rename, functionality is identical.
14+
15+
We recommend a search replace for the following terms, in no particular order:
16+
- `OutputStream` is now `MixerDeviceSink` (in anticipation of future
17+
`QueueDeviceSink`)
18+
- `OutputStreamBuilder` is now `DeviceSinkBuilder`
19+
- `open_stream_or_fallback` is now `open_sink_or_fallback`
20+
- `open_default_stream` is now `open_default_sink`
21+
- `open_stream` is now `open_mixer` (in anticipation of future `open_queue`)
22+
- `Sink` is now `Player`
23+
- `SpatialSink` is now `SpatialPlayer`
24+
- `StreamError` is now `OsSinkError`
25+
- `output_to_wav` renamed to `wav_to_file` and now takes ownership of the `Source`.
26+
- `SamplesBuffer::new` now takes ChannelCount and SampleRate as arguments. Use
27+
the `nz!` macro to easily create those from literals like this:
28+
`SamplesBuffer::new(nz!(1), nz!(44100))`
29+
or construct them at runtime like this:
30+
`SamplesBuffer::new(NonZero::new(channel_count)?, NonZero::new(sample_rate)?)`;
1131

1232
# rodio 0.20 or earlier to 0.21.1
1333

0 commit comments

Comments
 (0)