diff options
author | Chris Robinson <[email protected]> | 2011-05-15 00:18:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-05-15 00:18:28 -0700 |
commit | 949cfe2ceb7ada5f7ab9b1ad9df795c817717b82 (patch) | |
tree | 5a8392ea6d927dded5fcbbc1c4a6b432b3ce110b | |
parent | c39f27d5f89f278a09b05f3dfdc9a3f245a0f9af (diff) |
Re-enable duplication for stereo sounds
-rw-r--r-- | Alc/ALu.c | 19 | ||||
-rw-r--r-- | alsoftrc.sample | 15 |
2 files changed, 26 insertions, 8 deletions
@@ -213,6 +213,25 @@ ALvoid CalcNonAttnSourceParams(ALsource *ALSource, const ALCcontext *ALContext) } } } + else if((ALContext->Device->Flags&DEVICE_DUPLICATE_STEREO)) + { + static const ALfloat angles_StereoDup[4] = { -30.0f, -150.0f, + 30.0f, 150.0f }; + DryGain *= aluSqrt(2.0f/4.0f); + for(c = 0;c < 4;c++) + { + pos = aluCart2LUTpos(cos(angles_StereoDup[c] * (M_PI/180.0)), + sin(angles_StereoDup[c] * (M_PI/180.0))); + SpeakerGain = &Device->PanningLUT[MAXCHANNELS * pos]; + + for(i = 0;i < (ALint)Device->NumChan;i++) + { + Channel chan = Device->Speaker2Chan[i]; + SrcMatrix[c>>1][chan] += DryGain * ListenerGain * + SpeakerGain[chan]; + } + } + } else { for(c = 0;c < 2;c++) diff --git a/alsoftrc.sample b/alsoftrc.sample index 87ac2198..c1ec67f7 100644 --- a/alsoftrc.sample +++ b/alsoftrc.sample @@ -93,14 +93,13 @@ #sources = 256 ## stereodup: -# Sets whether to duplicate stereo sounds on the rear and side speakers for 4+ -# channel output. This provides a "fuller" playback quality for 4+ channel -# output modes, although each individual speaker will have a slight reduction -# in volume to compensate for the extra output speakers. True, yes, on, and -# non-0 values will duplicate stereo sources. 0 and anything else will cause -# stereo sounds to only play out the front speakers. This only has an effect -# when a suitable output format is used (ie. those that contain side and/or -# rear speakers). +# Sets whether to duplicate stereo sounds behind the listener for 4+ channel +# output. This provides a "fuller" playback quality for surround sound output +# modes, although each individual speaker will have a slight reduction in +# volume to compensate for the extra output speakers. True, yes, on, and non-0 +# values will duplicate stereo sources. 0 and anything else will cause stereo +# sounds to only play in front. This only has an effect when a suitable output +# format is used (ie. those that contain side and/or rear speakers). #stereodup = true ## scalemix: |