mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'james/audio-fix' into 'master'
Fix audio disabling See merge request veloren/veloren!1534
This commit is contained in:
commit
d369e8a7c9
@ -9,7 +9,7 @@ use veloren_voxygen::{
|
||||
logging,
|
||||
profile::Profile,
|
||||
run,
|
||||
settings::Settings,
|
||||
settings::{AudioOutput, Settings},
|
||||
window::Window,
|
||||
GlobalState,
|
||||
};
|
||||
@ -142,14 +142,11 @@ fn main() {
|
||||
anim::init();
|
||||
|
||||
// Setup audio
|
||||
//let mut audio = match settings.audio.output {
|
||||
// AudioOutput::Off => None,
|
||||
// AudioOutput::Automatic => audio::get_default_device(),
|
||||
// AudioOutput::Device(ref dev) => Some(dev.clone()),
|
||||
//}
|
||||
//.map(|dev| AudioFrontend::new(dev, settings.audio.max_sfx_channels))
|
||||
//.unwrap_or_else(AudioFrontend::no_audio);
|
||||
let mut audio = AudioFrontend::new(settings.audio.max_sfx_channels);
|
||||
let mut audio = match settings.audio.output {
|
||||
AudioOutput::Off => AudioFrontend::no_audio(),
|
||||
AudioOutput::Automatic => AudioFrontend::new(settings.audio.max_sfx_channels),
|
||||
// AudioOutput::Device(ref dev) => Some(dev.clone()),
|
||||
};
|
||||
|
||||
audio.set_music_volume(settings.audio.music_volume);
|
||||
audio.set_sfx_volume(settings.audio.sfx_volume);
|
||||
|
Loading…
Reference in New Issue
Block a user