mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread, but that still caused some blending of the channels. SVN r875 (trunk)
This commit is contained in:
parent
d2c275bbb3
commit
799a4ea1bb
2 changed files with 9 additions and 12 deletions
|
@ -1,4 +1,7 @@
|
|||
April 2, 2008
|
||||
- Switched sounds local to the listener from head-relative 3D sounds to 2D
|
||||
sounds so stereo sounds have full separation. I tried using set3DSpread,
|
||||
but that still caused some blending of the channels.
|
||||
- Changed FScanner so that opening a lump gives the complete wad+lump name
|
||||
rather than a generic one, so identifying errors among files that all have
|
||||
the same lump name no longer involves any degree of guesswork in
|
||||
|
|
|
@ -1191,7 +1191,7 @@ FMOD_MODE FMODSoundRenderer::SetChanHeadSettings(FMOD::Channel *chan, sfxinfo_t
|
|||
{
|
||||
return oldmode;
|
||||
}
|
||||
double cpos[3];
|
||||
float cpos[3];
|
||||
cpos[0] = FIXED2FLOAT(players[consoleplayer].camera->x);
|
||||
cpos[2] = FIXED2FLOAT(players[consoleplayer].camera->y);
|
||||
cpos[1] = FIXED2FLOAT(players[consoleplayer].camera->z);
|
||||
|
@ -1226,11 +1226,11 @@ FMOD_MODE FMODSoundRenderer::SetChanHeadSettings(FMOD::Channel *chan, sfxinfo_t
|
|||
return oldmode;
|
||||
}
|
||||
else if (cpos[0] == pos[0] && cpos[1] == pos[1] && cpos[2] == pos[2])
|
||||
{
|
||||
pos[2] = pos[1] = pos[0] = 0;
|
||||
return (oldmode & ~FMOD_3D_WORLDRELATIVE) | FMOD_3D_HEADRELATIVE;
|
||||
{ // Head relative
|
||||
return (oldmode & ~FMOD_3D) | FMOD_2D;
|
||||
}
|
||||
return (oldmode & ~FMOD_3D_HEADRELATIVE) | FMOD_3D_WORLDRELATIVE;
|
||||
// World relative
|
||||
return (oldmode & ~FMOD_2D) | FMOD_3D;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1556,15 +1556,9 @@ void FMODSoundRenderer::DoLoad(void **slot, sfxinfo_t *sfx)
|
|||
exinfo.length = size;
|
||||
}
|
||||
result = Sys->createSound((char *)sfxstart, samplemode, &exinfo, &sample);
|
||||
if (result == FMOD_ERR_OUTPUT_CREATEBUFFER && !(samplemode & FMOD_SOFTWARE))
|
||||
{
|
||||
DPrintf("Trying to fall back to software sample\n");
|
||||
samplemode = (samplemode & ~FMOD_HARDWARE) | FMOD_SOFTWARE;
|
||||
result = Sys->createSound((char *)sfxstart, samplemode, &exinfo, &sample);
|
||||
}
|
||||
if (result != FMOD_OK)
|
||||
{
|
||||
DPrintf("Failed to allocate sample: %d\n", result);
|
||||
DPrintf("Failed to allocate sample: Error %d\n", result);
|
||||
errcount++;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue