diff options
author | Chris Robinson <[email protected]> | 2017-05-04 12:17:50 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-05-04 12:27:10 -0700 |
commit | b639bc99132015217ff173680e1a43f44fad2ce3 (patch) | |
tree | e437b8aad0d56b719dceb5baf4da4efcad86e838 /Alc | |
parent | 7829ad8fc9802442759b80014a695d7425fdf6de (diff) |
Add a property to force source spatialization on or off
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |