Skip to content

Commit

Permalink
Fixed|OpenAL: Unbind buffer always before changing its data
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 14, 2013
1 parent 69c1f9a commit dea6e33
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/plugins/openal/src/driver_openal.cpp
Expand Up @@ -271,6 +271,9 @@ void DS_SFX_Load(sfxbuffer_t* buf, struct sfxsample_s* sample)
return; // No need to reload.
}

// Make sure its not bound right now.
alSourcei(SRC(buf), AL_BUFFER, 0);

alBufferData(BUF(buf),
sample->bytesPer == 1 ? AL_FORMAT_MONO8 : AL_FORMAT_MONO16,
sample->data, sample->size, sample->rate);
Expand Down

0 comments on commit dea6e33

Please sign in to comment.