summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-30 23:39:01 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-30 23:39:01 +0000
commitc470666c579c9d390da9a68022c433fd5ad0a5ff (patch)
tree3c6ef7c226ee25332119183e97cdac53ee46b62e /libao2
parentc8c416c516e031771b16f3b940a6ad0bfd7c3d2c (diff)
downloadmpv-c470666c579c9d390da9a68022c433fd5ad0a5ff.tar.bz2
mpv-c470666c579c9d390da9a68022c433fd5ad0a5ff.tar.xz
Change code to also work with different outburst sizes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25940 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_openal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libao2/ao_openal.c b/libao2/ao_openal.c
index f5e4acbd9e..5428f94f2b 100644
--- a/libao2/ao_openal.c
+++ b/libao2/ao_openal.c
@@ -212,7 +212,7 @@ static int play(void *data, int len, int flags) {
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 @@ static int play(void *data, int len, int flags) {
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) {