mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Disable PCM-8 output when not using DirectSound
- PCM-8 sounds like garbage with WASAPI and WaveOut, so force anything not DirectSound to use PCM-16 if PCM-8 is selected.
This commit is contained in:
parent
f7bd3acec4
commit
dba76c1aea
1 changed files with 9 additions and 0 deletions
|
@ -895,6 +895,15 @@ bool FMODSoundRenderer::Init()
|
|||
// Set software format
|
||||
eval = Enum_NumForName(SoundFormatNames, snd_output_format);
|
||||
format = eval >= 0 ? FMOD_SOUND_FORMAT(eval) : FMOD_SOUND_FORMAT_PCM16;
|
||||
if (format == FMOD_SOUND_FORMAT_PCM8)
|
||||
{
|
||||
// PCM-8 sounds like garbage with anything but DirectSound.
|
||||
FMOD_OUTPUTTYPE output;
|
||||
if (FMOD_OK != Sys->getOutput(&output) || output != FMOD_OUTPUTTYPE_DSOUND)
|
||||
{
|
||||
format = FMOD_SOUND_FORMAT_PCM16;
|
||||
}
|
||||
}
|
||||
eval = Enum_NumForName(ResamplerNames, snd_resampler);
|
||||
resampler = eval >= 0 ? FMOD_DSP_RESAMPLER(eval) : FMOD_DSP_RESAMPLER_LINEAR;
|
||||
// These represented the frequency limits for hardware channels, which we never used anyway.
|
||||
|
|
Loading…
Reference in a new issue