diff options
author | Justas LaviĊĦius <bucaneer@gmail.com> | 2015-11-17 17:03:31 +0200 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2015-11-18 08:26:07 -0800 |
commit | ca77bcd5434d6cfb379a46aeee880f8c2b076872 (patch) | |
tree | e68a2b2b778b5ed0282dbdd77eb3c018fe679121 /audio/out | |
parent | e086d404867195dcbc46c96e9f5c9cf30bcd68e0 (diff) | |
download | mpv-ca77bcd5434d6cfb379a46aeee880f8c2b076872.tar.bz2 mpv-ca77bcd5434d6cfb379a46aeee880f8c2b076872.tar.xz |
ao_openal: fix virtual speaker positioning
Place speakers in standard positions equidistant from the listener.
use standard coordinate system
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_openal.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/audio/out/ao_openal.c b/audio/out/ao_openal.c index 03e6aefc59..58eb1a169c 100644 --- a/audio/out/ao_openal.c +++ b/audio/out/ao_openal.c @@ -118,15 +118,15 @@ struct speaker { }; static const struct speaker speaker_pos[] = { - {MP_SPEAKER_ID_FL, {-1, 0, 0.5}}, - {MP_SPEAKER_ID_FR, { 1, 0, 0.5}}, - {MP_SPEAKER_ID_FC, { 0, 0, 1}}, - {MP_SPEAKER_ID_LFE, { 0, 0, 0.1}}, - {MP_SPEAKER_ID_BL, {-1, 0, -1}}, - {MP_SPEAKER_ID_BR, { 1, 0, -1}}, - {MP_SPEAKER_ID_BC, { 0, 0, -1}}, - {MP_SPEAKER_ID_SL, {-1, 0, 0}}, - {MP_SPEAKER_ID_SR, { 1, 0, 0}}, + {MP_SPEAKER_ID_FL, {-0.500, 0, -0.866}}, // -30 deg + {MP_SPEAKER_ID_FR, { 0.500, 0, -0.866}}, // 30 deg + {MP_SPEAKER_ID_FC, { 0, 0, -1}}, // 0 deg + {MP_SPEAKER_ID_LFE, { 0, -1, 0}}, // below + {MP_SPEAKER_ID_BL, {-0.609, 0, 0.793}}, // -142.5 deg + {MP_SPEAKER_ID_BR, { 0.609, 0, 0.793}}, // -142.5 deg + {MP_SPEAKER_ID_BC, { 0, 0, 1}}, // 180 deg + {MP_SPEAKER_ID_SL, {-0.985, 0, 0.174}}, // -100 deg + {MP_SPEAKER_ID_SR, { 0.985, 0, 0.174}}, // 100 deg {-1}, }; @@ -162,7 +162,7 @@ static void uninit(struct ao *ao) static int init(struct ao *ao) { float position[3] = {0, 0, 0}; - float direction[6] = {0, 0, 1, 0, -1, 0}; + float direction[6] = {0, 0, -1, 0, 1, 0}; ALCdevice *dev = NULL; ALCcontext *ctx = NULL; ALCint freq = 0; |