bevy_audio_controller 0.5.0

Bevy plugin for managed audio playback
Documentation
1
2
3
4
5
6
7
8
9
10
use bevy::{audio::Volume, ecs::system::Res};

use crate::{bounds::ACBounds, global::GlobalChannel, resources::ChannelSettings};

pub fn get_normalized_volume<Channel: ACBounds>(
    channel: &Res<ChannelSettings<Channel>>,
    global: &Res<ChannelSettings<GlobalChannel>>,
) -> Volume {
    channel.get_channel_volume() * global.get_channel_volume()
}