Mercurial > mm7
diff VideoPlayer.h @ 2208:0b2eea6f80c9
for video in homes
author | Ritor1 |
---|---|
date | Wed, 12 Feb 2014 16:33:12 +0600 |
parents | ca548138d6aa |
children | c69013c186c7 |
line wrap: on
line diff
--- a/VideoPlayer.h Thu Feb 06 17:20:12 2014 +0600 +++ b/VideoPlayer.h Wed Feb 12 16:33:12 2014 +0600 @@ -266,13 +266,20 @@ int num_processed_buffers; alGetSourcei(samples_source_id, AL_BUFFERS_PROCESSED, &num_processed_buffers); - while (num_processed_buffers) + /*while (num_processed_buffers) { unsigned int processed_buffers_id[4]; alSourceUnqueueBuffers(samples_source_id, min(4, num_processed_buffers), processed_buffers_id); CheckError(); alGetSourcei(samples_source_id, AL_BUFFERS_PROCESSED, &num_processed_buffers); - } + }*/ + for (int i = 0; i < num_processed_buffers; ++i) + { + unsigned int processed_buffer_id; + alSourceUnqueueBuffers(samples_source_id, 1, &processed_buffer_id); + if (!CheckError()) + alDeleteBuffers(1, &processed_buffer_id); + } int num_queued_buffers; alGetSourcei(samples_source_id, AL_BUFFERS_QUEUED, &num_queued_buffers);