@@ -8,7 +8,7 @@ repository = "https://github.com/RustAudio/rodio"
88documentation = " https://docs.rs/rodio"
99exclude = [" assets/**" , " tests/**" ]
1010edition = " 2021"
11- rust-version = " 1.87 "
11+ rust-version = " 1.89 "
1212
1313[features ]
1414# Default feature set provides audio playback and common format support
@@ -50,6 +50,11 @@ noise = ["rand", "rand_distr"]
5050# Enable WebAssembly support for web browsers
5151wasm-bindgen = [" cpal/wasm-bindgen" ]
5252
53+ # Base symphonia feature (doesn't enable any codecs)
54+ # A feature with this name is created implicitly due to other features that reference `symphonia/xxx`
55+ # but we need to make it explicit here so other features can reference it.
56+ symphonia = [" dep:symphonia" ]
57+
5358# To decode an audio source with Rodio, you need to enable the appropriate features for *both* the
5459# demuxer and the decoder.
5560#
@@ -96,6 +101,9 @@ symphonia-wav = ["symphonia/wav"]
96101# Enable SIMD optimisations for Symphonia
97102symphonia-simd = [" symphonia/opt-simd" ]
98103
104+ # libopus adapter for Symphonia
105+ symphonia-libopus = [" symphonia" , " dep:symphonia-adapter-libopus" ]
106+
99107# Alternative decoders and demuxers
100108claxon = [" dep:claxon" ] # FLAC
101109hound = [" dep:hound" ] # WAV
@@ -126,13 +134,16 @@ atomic_float = { version = "1.1.0", optional = true }
126134rtrb = { version = " 0.3.2" , optional = true }
127135num-rational = " 0.4.2"
128136
137+ symphonia-adapter-libopus = { version = " 0.2" , optional = true }
138+
129139[dev-dependencies ]
130140quickcheck = " 1"
131141rstest = " 0.26"
132142rstest_reuse = " 0.7"
133143approx = " 0.5.1"
134144divan = " 0.1.14"
135145inquire = " 0.9.3"
146+ symphonia-adapter-fdk-aac = " 0.1"
136147
137148[[bench ]]
138149name = " effects"
@@ -230,6 +241,10 @@ required-features = ["playback", "vorbis"]
230241name = " music_wav"
231242required-features = [" playback" , " wav" ]
232243
244+ [[example ]]
245+ name = " music_opus"
246+ required-features = [" playback" , " symphonia-libopus" ]
247+
233248[[example ]]
234249name = " noise_generator"
235250required-features = [" playback" , " noise" ]
@@ -253,3 +268,7 @@ required-features = ["playback", "vorbis"]
253268[[example ]]
254269name = " stereo"
255270required-features = [" playback" , " vorbis" ]
271+
272+ [[example ]]
273+ name = " third_party_codec"
274+ required-features = [" playback" , " symphonia" , " symphonia-isomp4" ]
0 commit comments