diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-12-09 12:14:14 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-12-09 12:14:14 +0000 |
commit | 134a537a76e429b16b8069e60d51ddbd4d6a0494 (patch) | |
tree | 93c450b93c8acaa07fc0a969b172c77e8cf98128 | |
parent | 83916cab7fa9813c07743281a5eb65f4b978e23d (diff) | |
download | mpv-134a537a76e429b16b8069e60d51ddbd4d6a0494.tar.bz2 mpv-134a537a76e429b16b8069e60d51ddbd4d6a0494.tar.xz |
Improve OpenAL speaker positions a bit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21546 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_openal.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libao2/ao_openal.c b/libao2/ao_openal.c index a619236f9a..d3a3233b76 100644 --- a/libao2/ao_openal.c +++ b/libao2/ao_openal.c @@ -61,12 +61,11 @@ static void print_help(void) { static int init(int rate, int channels, int format, int flags) { float position[3] = {0, 0, 0}; - float direction[6] = {0, 0, 1, 0, 1, 0}; + float direction[6] = {0, 0, 1, 0, -1, 0}; float sppos[6][3] = { - {-1, 0, 1}, {1, 0, 1}, - {-1, 0, -1}, {1, 0, -1}, - {0, 0, 0}, - {0, 0, 0} + {-1, 0, 0.5}, {1, 0, 0.5}, + {-1, 0, -1}, {1, 0, -1}, + {0, 0, 1}, {0, 0, 0.1}, }; ALCdevice *dev = NULL; ALCcontext *ctx = NULL; @@ -100,6 +99,8 @@ static int init(int rate, int channels, int format, int flags) { alSourcefv(sources[i], AL_POSITION, sppos[i]); alSource3f(sources[i], AL_VELOCITY, 0, 0, 0); } + if (channels == 1) + alSource3f(sources[0], AL_POSITION, 0, 0, 1); ao_data.channels = channels; alGetBufferi(buffers[0][0], AL_FREQUENCY, &bufrate); ao_data.samplerate = rate = bufrate; |