Skip to content

Audio PlaybackSettings volume setting doesn't correspond to human perception of volume well #8835

@Telov

Description

@Telov

Bevy version 0.10.1

If I set volume to 0.01 only then will it be subjectively about 3-5 times quieter than on default. 3-5 as in lowering volume on youtube to 33% or 20%

How to reproduce:

use bevy::{prelude::*};

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .add_startup_system(produce_sound)
        .run();
}

fn produce_sound(
    audio: Res<Audio>,
    asset_server: Res<AssetServer>
) {
    let sound_effect_1 = asset_server.load("audio/pluck_001.ogg");

    let playback_settings = PlaybackSettings {
         repeat: false,
         volume: 0.003f32, //this value for me lowers sound subjectively to about 2%, try different values
         speed: 1f32,
     };
     audio.play_with_settings(sound_effect_1.clone(), playback_settings);
    }
}

audiofile: https://fastupload.io/pKOtqjihV6SkJlH/file

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-AudioSounds playback and modificationC-DocsAn addition or correction to our documentationC-FeatureA new feature, making something new possibleD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions