mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Fixed: When FMOD::System::init() returns FMOD_ERR_OUTPUT_CREATEBUFFER, it
could also be because the user selected PCM-Float output, but the driver doesn't support it (even if it claims to *cough*Audigy XP drivers*cough*). SVN r943 (trunk)
This commit is contained in:
parent
dbf4677da9
commit
b192762bc1
2 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
April 26, 2008
|
||||
- Fixed: When FMOD::System::init() returns FMOD_ERR_OUTPUT_CREATEBUFFER, it
|
||||
could also be because the user selected PCM-Float output, but the driver
|
||||
doesn't support it (even if it claims to *cough*Audigy XP drivers*cough*).
|
||||
|
||||
April 26, 2008 (Changes by Graf Zahl)
|
||||
- Added speed factors for texture warp commands.
|
||||
- Added damage type parameter to A_Die.
|
||||
|
|
|
@ -665,10 +665,25 @@ bool FMODSoundRenderer::Init()
|
|||
{
|
||||
result = Sys->init(snd_channels + NUM_EXTRA_SOFTWARE_CHANNELS, initflags, 0);
|
||||
if (result == FMOD_ERR_OUTPUT_CREATEBUFFER)
|
||||
{ // The speaker mode selected isn't supported by this soundcard. Switch it back to stereo.
|
||||
result = Sys->getSpeakerMode(&speakermode);
|
||||
if (result == FMOD_OK && FMOD_OK == Sys->setSpeakerMode(FMOD_SPEAKERMODE_STEREO))
|
||||
{
|
||||
// Possible causes of a buffer creation failure:
|
||||
// 1. The speaker mode selected isn't supported by this soundcard. Force it to stereo.
|
||||
// 2. The output format is unsupported. Force it to 16-bit PCM.
|
||||
// 3. ???
|
||||
result = Sys->getSpeakerMode(&speakermode);
|
||||
if (result == FMOD_OK &&
|
||||
speakermode != FMOD_SPEAKERMODE_STEREO &&
|
||||
FMOD_OK == Sys->setSpeakerMode(FMOD_SPEAKERMODE_STEREO))
|
||||
{
|
||||
Printf(TEXTCOLOR_RED" Buffer creation failed. Retrying with stereo output.\n");
|
||||
continue;
|
||||
}
|
||||
result = Sys->getSoftwareFormat(&samplerate, &format, NULL, NULL, &resampler, NULL);
|
||||
if (result == FMOD_OK &&
|
||||
format != FMOD_SOUND_FORMAT_PCM16 &&
|
||||
FMOD_OK == Sys->setSoftwareFormat(samplerate, FMOD_SOUND_FORMAT_PCM16, 0, 0, resampler))
|
||||
{
|
||||
Printf(TEXTCOLOR_RED" Buffer creation failed. Retrying with PCM-16 output.\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue