aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALu.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-05-04 12:17:50 -0700
committerChris Robinson <[email protected]>2017-05-04 12:27:10 -0700
commitb639bc99132015217ff173680e1a43f44fad2ce3 (patch)
treee437b8aad0d56b719dceb5baf4da4efcad86e838 /Alc/ALu.c
parent7829ad8fc9802442759b80014a695d7425fdf6de (diff)
Add a property to force source spatialization on or off
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r--Alc/ALu.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index e3160dab..9ce452e9 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1355,6 +1355,7 @@ static void CalcSourceParams(ALvoice *voice, ALCcontext *context, ALboolean forc
ATOMIC_REPLACE_HEAD(struct ALvoiceProps*, &voice->FreeList, props);
}
+ props = voice->Props;
BufferListItem = ATOMIC_LOAD(&voice->current_buffer, almemory_order_relaxed);
while(BufferListItem != NULL)
@@ -1362,10 +1363,11 @@ static void CalcSourceParams(ALvoice *voice, ALCcontext *context, ALboolean forc
const ALbuffer *buffer;
if((buffer=BufferListItem->buffer) != NULL)
{
- if(buffer->FmtChannels == FmtMono)
- CalcAttnSourceParams(voice, voice->Props, buffer, context);
+ if(props->SpatializeMode == SpatializeOn ||
+ (props->SpatializeMode == SpatializeAuto && buffer->FmtChannels == FmtMono))
+ CalcAttnSourceParams(voice, props, buffer, context);
else
- CalcNonAttnSourceParams(voice, voice->Props, buffer, context);
+ CalcNonAttnSourceParams(voice, props, buffer, context);
break;
}
BufferListItem = ATOMIC_LOAD(&BufferListItem->next, almemory_order_acquire);