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:
@@ -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;
|
||||||
@@ -77,6 +78,10 @@ initAudio (sint32 driver, sint32 flags)
|
|||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetSFXVolume (sfxVolumeScale);
|
||||||
|
SetSpeechVolume (speechVolumeScale);
|
||||||
|
SetMusicVolume (musicVolume);
|
||||||
|
|
||||||
audio_inited = true;
|
audio_inited = true;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user