@@ -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,9 @@ 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+ symphonia = [" dep:symphonia" ]
55+
5356# To decode an audio source with Rodio, you need to enable the appropriate features for *both* the
5457# demuxer and the decoder.
5558#
@@ -96,15 +99,15 @@ symphonia-wav = ["symphonia/wav"]
9699# Enable SIMD optimisations for Symphonia
97100symphonia-simd = [" symphonia/opt-simd" ]
98101
102+ # libopus adapter for Symphonia
103+ symphonia-libopus = [" symphonia" , " dep:symphonia-adapter-libopus" ]
104+
99105# Alternative decoders and demuxers
100106claxon = [" dep:claxon" ] # FLAC
101107hound = [" dep:hound" ] # WAV
102108minimp3 = [" dep:minimp3_fixed" ] # MP3
103109lewton = [" dep:lewton" ] # Ogg Vorbis
104110
105- # Third party codec example
106- libopus = [" dep:symphonia-adapter-libopus" ]
107-
108111[package .metadata .docs .rs ]
109112all-features = true
110113rustdoc-args = [" --cfg" , " docsrs" ]
@@ -129,7 +132,7 @@ atomic_float = { version = "1.1.0", optional = true }
129132rtrb = { version = " 0.3.2" , optional = true }
130133num-rational = " 0.4.2"
131134
132- symphonia-adapter-libopus = {version = " 0.2" , optional = true }
135+ symphonia-adapter-libopus = { version = " 0.2" , optional = true }
133136
134137[dev-dependencies ]
135138quickcheck = " 1"
@@ -138,6 +141,7 @@ rstest_reuse = "0.7"
138141approx = " 0.5.1"
139142divan = " 0.1.14"
140143inquire = " 0.9.3"
144+ symphonia-adapter-fdk-aac = " 0.1"
141145
142146[[bench ]]
143147name = " effects"
@@ -235,6 +239,10 @@ required-features = ["playback", "vorbis"]
235239name = " music_wav"
236240required-features = [" playback" , " wav" ]
237241
242+ [[example ]]
243+ name = " music_opus"
244+ required-features = [" playback" , " symphonia-libopus" ]
245+
238246[[example ]]
239247name = " noise_generator"
240248required-features = [" playback" , " noise" ]
@@ -261,4 +269,4 @@ required-features = ["playback", "vorbis"]
261269
262270[[example ]]
263271name = " third_party_codec"
264- required-features = [" playback" , " symphonia" , " libopus " ]
272+ required-features = [" playback" , " symphonia" , " symphonia-isomp4 " ]
0 commit comments