Commits

Bart van Strien  committed fd83ded

More audio fixes (bug #217)

  • Participants
  • Parent commits aee6a8b

Comments (0)

Files changed (1)

File src/modules/audio/openal/Source.cpp

 			// Looping mode could have changed.
 			alSourcei(source, AL_LOOPING, isLooping() ? AL_TRUE : AL_FALSE);
 		}
-		else if(valid && type == TYPE_STREAM)
+		else if(valid && type == TYPE_STREAM && !(!isLooping() && isFinished()))
 		{
 			// Number of processed buffers.
 			ALint processed;
 
 		int fmt = getFormat(d->getChannels(), d->getBits());
 
-		if(decoded > 0 && fmt != 0)
+		if(fmt != 0)
 			alBufferData(buffer, fmt, d->getBuffer(), decoded, d->getSampleRate());
 
 		if(decoder->isFinished() && isLooping()) {