use ogg by default instead of mp3 (#3421)

# Objective

- mp3 feature of rodio has dependencies that are not maintained with security issues
- mp3 feature of rodio doesn't build in wasm
- mp3 feature of rodio uses internal memory allocation that cause rejection from Apple appstore

## Solution

- Use vorbis instead of mp3 by default


Co-authored-by: François <8672791+mockersf@users.noreply.github.com>
This commit is contained in:
François 2021-12-23 19:19:15 +00:00
parent c6d4c63f42
commit aeba9faf04
8 changed files with 6 additions and 8 deletions

View file

@ -23,7 +23,7 @@ default = [
"render", "render",
"png", "png",
"hdr", "hdr",
"mp3", "vorbis",
"x11", "x11",
"filesystem_watcher", "filesystem_watcher",
] ]

Binary file not shown.

Binary file not shown.

View file

@ -7,8 +7,6 @@ yanked = "deny"
notice = "deny" notice = "deny"
ignore = [ ignore = [
"RUSTSEC-2020-0056", # from gilrs v0.8.1 - unmaintained - https://github.com/koute/stdweb/issues/403 "RUSTSEC-2020-0056", # from gilrs v0.8.1 - unmaintained - https://github.com/koute/stdweb/issues/403
"RUSTSEC-2020-0158", # from rodio v0.14.0 - unmaintained - https://github.com/gnzlbg/slice_deque/issues/94
"RUSTSEC-2021-0047", # from rodio v0.14.0 - unsafety - https://github.com/gnzlbg/slice_deque/issues/90
"RUSTSEC-2020-0095", # from crevice dev dependency - unmaintained - https://github.com/johannhof/difference.rs/issues/45 "RUSTSEC-2020-0095", # from crevice dev dependency - unmaintained - https://github.com/johannhof/difference.rs/issues/45
"RUSTSEC-2021-0119", # from rodio 0.14.0 - unsafety - https://github.com/nix-rust/nix/issues/1541 "RUSTSEC-2021-0119", # from rodio 0.14.0 - unsafety - https://github.com/nix-rust/nix/issues/1541
] ]

View file

@ -11,7 +11,7 @@
|render|The render pipeline and all render related plugins.| |render|The render pipeline and all render related plugins.|
|png|PNG picture format support.| |png|PNG picture format support.|
|hdr|[HDR](https://en.wikipedia.org/wiki/High_dynamic_range) support.| |hdr|[HDR](https://en.wikipedia.org/wiki/High_dynamic_range) support.|
|mp3|MP3 audio format support.| |vorbis|Ogg Vorbis audio format support.|
|x11|Make GUI applications use X11 protocol. You could enable wayland feature to override this.| |x11|Make GUI applications use X11 protocol. You could enable wayland feature to override this.|
|filesystem_watcher|Enable watching the file system for asset hot reload| |filesystem_watcher|Enable watching the file system for asset hot reload|
@ -30,8 +30,8 @@
|jpeg|JPEG picture format support.| |jpeg|JPEG picture format support.|
|bmp|BMP picture format support.| |bmp|BMP picture format support.|
|flac|FLAC audio format support. It's included in bevy_audio feature.| |flac|FLAC audio format support. It's included in bevy_audio feature.|
|mp3|MP3 audio format support.|
|wav|WAV audio format support.| |wav|WAV audio format support.|
|vorbis|Vorbis audio format support.|
|serialize|Enables serialization of `bevy_input` types.| |serialize|Enables serialization of `bevy_input` types.|
|wayland|Enable this to use Wayland display server protocol other than X11.| |wayland|Enable this to use Wayland display server protocol other than X11.|
|subpixel_glyph_atlas|Enable this to cache glyphs using subpixel accuracy. This increases texture memory usage as each position requires a separate sprite in the glyph atlas, but provide more accurate character spacing.| |subpixel_glyph_atlas|Enable this to cache glyphs using subpixel accuracy. This increases texture memory usage as each position requires a separate sprite in the glyph atlas, but provide more accurate character spacing.|

View file

@ -9,6 +9,6 @@ fn main() {
} }
fn setup(asset_server: Res<AssetServer>, audio: Res<Audio>) { fn setup(asset_server: Res<AssetServer>, audio: Res<Audio>) {
let music = asset_server.load("sounds/Windless Slopes.mp3"); let music = asset_server.load("sounds/Windless Slopes.ogg");
audio.play(music); audio.play(music);
} }

View file

@ -15,7 +15,7 @@ bevy = { path = "../../", features = [
"bevy_audio", "bevy_audio",
"bevy_winit", "bevy_winit",
"render", "render",
"mp3", "vorbis",
"x11", "x11",
"filesystem_watcher" "filesystem_watcher"
], default-features = false} ], default-features = false}

View file

@ -91,6 +91,6 @@ fn setup_scene(
} }
fn setup_music(asset_server: Res<AssetServer>, audio: Res<Audio>) { fn setup_music(asset_server: Res<AssetServer>, audio: Res<Audio>) {
let music = asset_server.load("sounds/Windless Slopes.mp3"); let music = asset_server.load("sounds/Windless Slopes.ogg");
audio.play(music); audio.play(music);
} }