Mercurial > mplayer.hg
changeset 25908:7cf1b1c1c44c
Change code to also work with different outburst sizes
author | reimar |
---|---|
date | Wed, 30 Jan 2008 23:39:01 +0000 |
parents | bc8452f11147 |
children | f6a0f861f7e6 |
files | libao2/ao_openal.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libao2/ao_openal.c Wed Jan 30 23:37:30 2008 +0000 +++ b/libao2/ao_openal.c Wed Jan 30 23:39:01 2008 +0000 @@ -212,7 +212,7 @@ int i, j, k; int ch; int16_t *d = data; - len /= ao_data.outburst; + len /= ao_data.channels * CHUNK_SIZE; for (i = 0; i < len; i++) { for (ch = 0; ch < ao_data.channels; ch++) { for (j = 0, k = ch; j < CHUNK_SIZE / 2; j++, k += ao_data.channels) @@ -227,7 +227,7 @@ alGetSourcei(sources[0], AL_SOURCE_STATE, &state); if (state != AL_PLAYING) // checked here in case of an underrun alSourcePlayv(ao_data.channels, sources); - return len * ao_data.outburst; + return len * ao_data.channels * CHUNK_SIZE; } static float get_delay(void) {