Audio drivers have no business setting channel volumes from user settings

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3636 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
avolkov
2011-07-08 22:23:28 +00:00
parent 9acf723bd9
commit 812d98449d
4 changed files with 5 additions and 12 deletions
+5
View File
@@ -20,6 +20,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "audiocore.h" #include "audiocore.h"
#include "sound.h"
#include "libs/log.h" #include "libs/log.h"
static audio_Driver audiodrv; static audio_Driver audiodrv;
@@ -76,6 +77,10 @@ initAudio (sint32 driver, sint32 flags)
"NOTICE: Try running UQM with '--sound=none' option"); "NOTICE: Try running UQM with '--sound=none' option");
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
SetSFXVolume (sfxVolumeScale);
SetSpeechVolume (speechVolumeScale);
SetMusicVolume (musicVolume);
audio_inited = true; audio_inited = true;
@@ -148,10 +148,6 @@ noSound_Init (audio_Driver *driver, sint32 flags)
atexit (unInitAudio); atexit (unInitAudio);
SetSFXVolume (sfxVolumeScale);
SetSpeechVolume (speechVolumeScale);
SetMusicVolume ((COUNT)musicVolume);
PlaybackTask = AssignTask (PlaybackTaskFunc, 1024, PlaybackTask = AssignTask (PlaybackTaskFunc, 1024,
"nosound audio playback"); "nosound audio playback");
@@ -212,10 +212,6 @@ mixSDL_Init (audio_Driver *driver, sint32 flags)
atexit (unInitAudio); atexit (unInitAudio);
SetSFXVolume (sfxVolumeScale);
SetSpeechVolume (speechVolumeScale);
SetMusicVolume ((COUNT)musicVolume);
SDL_PauseAudio (0); SDL_PauseAudio (0);
return 0; return 0;
@@ -193,10 +193,6 @@ openAL_Init (audio_Driver *driver, sint32 flags)
return -1; return -1;
} }
SetSFXVolume (sfxVolumeScale);
SetSpeechVolume (speechVolumeScale);
SetMusicVolume ((COUNT) musicVolume);
if (optStereoSFX) if (optStereoSFX)
alDistanceModel (AL_INVERSE_DISTANCE); alDistanceModel (AL_INVERSE_DISTANCE);
else else