aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/mixer.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-02-25 16:46:30 -0800
committerChris Robinson <[email protected]>2017-02-25 18:10:09 -0800
commit513c18fdc4d0d9184e061570209eb59f4ad0e392 (patch)
treebe71c303104b0dd998acd3be69211be580705952 /Alc/mixer.c
parent9539ccc18be1ddda6ef32c2d4bd4c15b4ed4115c (diff)
Ensure a non-playing or -paused source does not use a mixing voice
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r--Alc/mixer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c
index 46ca0892..be09ed67 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -366,7 +366,7 @@ static const ALfloat *DoFilters(ALfilterState *lpfilter, ALfilterState *hpfilter
}
-void MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei SamplesToDo)
+ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei SamplesToDo)
{
ResamplerFunc Resample;
ALbufferlistitem *BufferListItem;
@@ -685,4 +685,5 @@ void MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei Samp
ATOMIC_STORE(&Source->current_buffer, BufferListItem, almemory_order_relaxed);
ATOMIC_STORE(&Source->position, DataPosInt, almemory_order_relaxed);
ATOMIC_STORE(&Source->position_fraction, DataPosFrac, almemory_order_release);
+ return State == AL_PLAYING;
}