mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- Fixed: Sounds apparently don't default to location 0,0,0 so I need to set
that explicitly for 2D sounds in 3D mode. - Fixed: I had forgotten to actually set the head relative flag for 2D sounds played in 3D. - Fixed: Reverb was applied to digital music in software 3D mode. SVN r793 (trunk)
This commit is contained in:
parent
9b6d764512
commit
5f746bea5e
2 changed files with 28 additions and 5 deletions
|
@ -1,3 +1,15 @@
|
|||
March 10, 2008
|
||||
- EAX is a pain in the butt to get it to work reliably. Why? I can get the
|
||||
reverb to work just fine with software, but with hardware, I hear nothing
|
||||
special at all.
|
||||
- Fixed: Sounds apparently don't default to location 0,0,0 so I need to set
|
||||
that explicitly for 2D sounds in 3D mode.
|
||||
- Fixed: I had forgotten to actually set the head relative flag for 2D sounds
|
||||
played in 3D.
|
||||
- Fixed: Reverb was applied to digital music in software 3D mode. I tried
|
||||
turning off reverb for 2D sounds too, but that turned it off for _all_
|
||||
subsequent sounds and not that specific channel.
|
||||
|
||||
March 9, 2008 (Changes by Graf Zahl)
|
||||
- fixed: StreamSong::SetPosition required a NULL pointer check.
|
||||
- fixed: The release build still linked to the old FMOD version.
|
||||
|
|
|
@ -277,8 +277,15 @@ public:
|
|||
}
|
||||
Channel->setChannelGroup(Owner->MusicGroup);
|
||||
Channel->setVolume(volume);
|
||||
Channel->setPaused(false);
|
||||
|
||||
if (Owner->Sound3D)
|
||||
{ // Ensure reverb is disabled when using 3D sound.
|
||||
FMOD_REVERB_CHANNELPROPERTIES reverb;
|
||||
if (FMOD_OK == Channel->getReverbProperties(&reverb))
|
||||
{
|
||||
reverb.Room = -10000;
|
||||
Channel->setReverbProperties(&reverb);
|
||||
}
|
||||
}
|
||||
if (normalize)
|
||||
{ // Attach a normalizer DSP unit to the channel.
|
||||
result = Owner->Sys->createDSPByType(FMOD_DSP_TYPE_NORMALIZE, &DSP);
|
||||
|
@ -287,6 +294,7 @@ public:
|
|||
Channel->addDSP(DSP);
|
||||
}
|
||||
}
|
||||
Channel->setPaused(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -891,16 +899,19 @@ long FMODSoundRenderer::StartSound(sfxinfo_t *sfx, float vol, float sep, int pit
|
|||
chan->setFrequency(freq);
|
||||
chan->setVolume(vol);
|
||||
chan->setPan(sep);
|
||||
chan->setPaused(false);
|
||||
if (Sound3D)
|
||||
{
|
||||
{ // Make 2D sounds head relative.
|
||||
FMOD_MODE mode;
|
||||
|
||||
if (FMOD_OK == chan->getMode(&mode))
|
||||
{
|
||||
mode = (mode & ~FMOD_3D_WORLDRELATIVE) | (FMOD_3D_HEADRELATIVE);
|
||||
chan->setMode(mode);
|
||||
}
|
||||
FMOD_VECTOR zero = { 0, 0, 0 };
|
||||
chan->set3DAttributes(&zero, &zero);
|
||||
}
|
||||
chan->setPaused(false);
|
||||
ChannelMap[channel].channelID = chan;
|
||||
ChannelMap[channel].soundID = id;
|
||||
ChannelMap[channel].bIsLooping = looping;
|
||||
|
@ -952,7 +963,7 @@ void FMODSoundRenderer::StopSound(long handle)
|
|||
{
|
||||
ChannelMap[handle].channelID->stop();
|
||||
UncheckSound(&S_sfx[ChannelMap[handle].soundID], ChannelMap[handle].bIsLooping);
|
||||
ChannelMap[handle].soundID = 0;
|
||||
ChannelMap[handle].soundID = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue