File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ The following Rodio *0.20.1* code:
34
34
let (_stream , handle ) = rodio :: OutputStream :: try_default ()? ;
35
35
let sink = rodio :: Sink :: try_new (& handle )? ;
36
36
```
37
- becomes this in Rodio * 0.21.0* :
37
+ Should be written like this in Rodio * 0.21.0* :
38
38
``` rust
39
39
let stream_handle = rodio :: OutputStreamBuilder :: open_default_stream ()? ;
40
40
let sink = rodio :: Sink :: connect_new (stream_handle . mixer ());
@@ -46,5 +46,18 @@ The `SpatialSink` changes mirror those in `Sink` described above.
46
46
Replace ` DynamicMixerController ` with ` Mixer ` and ` DynamicMixer ` with ` MixerSource ` .
47
47
48
48
## Decoder
49
- ` Decoder::new_mp4 ` no longer takes an ` Mp4Type ` as hint. You can remove the argument
49
+ - ` Decoder::new_mp4 ` no longer takes an ` Mp4Type ` as hint. You can remove the argument
50
+ - Symphonia now longer assumes all sources are seek-able. Use
51
+ ` DecoderBuilder::with_seekable ` or ` try_from ` on a ` File ` or ` Bufreader ` .
50
52
53
+ The following Rodio * 0.20.1* code
54
+ ``` rust
55
+ let file = File :: open (" music.ogg" )? ;
56
+ let reader = BufReader :: new (file );
57
+ let source = Decoder :: new (reader );
58
+ ```
59
+ Should be written like this in Rodio * 0.21.0* :
60
+ ``` rust
61
+ let file = File :: open (" music.ogg" )? ;
62
+ let source = Decoder :: try_from (music . ogg)? ;
63
+ ```
You can’t perform that action at this time.
0 commit comments