aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/ALu.c7
-rw-r--r--OpenAL32/Include/alSource.h4
-rw-r--r--OpenAL32/alSource.c3
3 files changed, 4 insertions, 10 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index bb7cc553..d0f6a112 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -932,7 +932,6 @@ static void MixSomeSources(ALCcontext *ALContext, float (*DryBuffer)[OUTPUTCHANN
ALuint DataPosInt, DataPosFrac;
ALuint Channels, Bytes;
ALuint Frequency;
- ALuint LoopStart, LoopEnd;
resampler_t Resampler;
ALuint BuffersPlayed;
ALboolean Looping;
@@ -993,8 +992,6 @@ next_source:
DataPosInt = ALSource->position;
DataPosFrac = ALSource->position_fraction;
Looping = ALSource->bLooping;
- LoopStart = ALSource->LoopStart;
- LoopEnd = ALSource->LoopEnd;
/* Compute 18.14 fixed point step */
Pitch = (ALSource->Params.Pitch*Frequency) / DeviceFreq;
@@ -1033,6 +1030,8 @@ next_source:
while(State == AL_PLAYING && j < SamplesToDo)
{
+ ALuint LoopStart = 0;
+ ALuint LoopEnd = 0;
ALuint DataSize = 0;
ALbuffer *ALBuffer;
ALfloat *Data;
@@ -1044,6 +1043,8 @@ next_source:
Data = ALBuffer->data;
DataSize = ALBuffer->size;
DataSize /= Channels * Bytes;
+ LoopStart = ALBuffer->LoopStart;
+ LoopEnd = ALBuffer->LoopEnd;
}
if(DataPosInt >= DataSize)
goto skipmix;
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 85a73059..0802cbaa 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -78,10 +78,6 @@ typedef struct ALsource
ALint lOffset;
ALint lOffsetType;
- // Only valid for static sources types
- ALint LoopStart;
- ALint LoopEnd;
-
// Source Type (Static, Streaming, or Undetermined)
ALint lSourceType;
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 139eb75b..066e7f72 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -564,9 +564,6 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source,ALenum eParam,ALint lValue)
Source->queue = BufferListItem;
Source->BuffersInQueue = 1;
- Source->LoopStart = buffer->LoopStart;
- Source->LoopEnd = buffer->LoopEnd;
-
// Increment reference counter for buffer
buffer->refcount++;
}