#can't hear mp3 audio

1 messages · Page 1 of 1 (latest)

rich mason
#

I have the following code:

commands.spawn(
    AudioBundle {
        source: asset_server.load(MAIN_MENU_SONG),
        settings: PlaybackSettings::LOOP.with_volume(Volume::new_relative(0.5)),
    }
);

When using a .ogg file it works fine, but if I use an .mp3 file, there is no sound. No errors show up in the console either.

Did I do something wrong?

teal pier
#

You should be seeing something like

2023-09-19T22:53:57.504645Z  WARN bevy_asset::asset_server: no `AssetLoader` found for the following extension: mp3

In the console.

By default bevy doesn't include mp3 support -- you need to enable the mp3 feature.