{"action":"created","issue":{"url":"https://api.github.com/repos/minetest/minetest/issues/1823","labels_url":"https://api.github.com/repos/minetest/minetest/issues/1823/labels{/name}","comments_url":"https://api.github.com/repos/minetest/minetest/issues/1823/comments","events_url":"https://api.github.com/repos/minetest/minetest/issues/1823/events","html_url":"https://github.com/minetest/minetest/issues/1823","id":48218887,"number":1823,"title":"Minetest plays stereo sound as mono","user":{"login":"Penguinum","id":5759312,"avatar_url":"https://avatars.githubusercontent.com/u/5759312?v=3","gravatar_id":"","url":"https://api.github.com/users/Penguinum","html_url":"https://github.com/Penguinum","followers_url":"https://api.github.com/users/Penguinum/followers","following_url":"https://api.github.com/users/Penguinum/following{/other_user}","gists_url":"https://api.github.com/users/Penguinum/gists{/gist_id}","starred_url":"https://api.github.com/users/Penguinum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Penguinum/subscriptions","organizations_url":"https://api.github.com/users/Penguinum/orgs","repos_url":"https://api.github.com/users/Penguinum/repos","events_url":"https://api.github.com/users/Penguinum/events{/privacy}","received_events_url":"https://api.github.com/users/Penguinum/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/minetest/minetest/labels/@%20Client%20/%20Audiovisuals","name":"@ Client / Audiovisuals","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-11-09T23:55:13Z","updated_at":"2015-12-27T06:15:48Z","closed_at":null,"body":"When I use minetest.sound_play(\"my_stereo_sound\"), Minetest plays this sound as mono. Wiki says: \"For positional playing of sounds, only single-channel (mono) files are supported. Otherwise OpenAL will play them non-positionally.\"\r\nDoes this mean that OpenAL will play stereo sounds not only without any \"binding\" to position, but also as mono? Or is it a bug? Or maybe I'm just doing something wrong?\r\nUpdate: I noticed that output audio is not mono, but channels are very similar.\r\n(Sorry for my bad English.)"},"comment":{"url":"https://api.github.com/repos/minetest/minetest/issues/comments/167388494","html_url":"https://github.com/minetest/minetest/issues/1823#issuecomment-167388494","issue_url":"https://api.github.com/repos/minetest/minetest/issues/1823","id":167388494,"user":{"login":"sofar","id":1880041,"avatar_url":"https://avatars.githubusercontent.com/u/1880041?v=3","gravatar_id":"","url":"https://api.github.com/users/sofar","html_url":"https://github.com/sofar","followers_url":"https://api.github.com/users/sofar/followers","following_url":"https://api.github.com/users/sofar/following{/other_user}","gists_url":"https://api.github.com/users/sofar/gists{/gist_id}","starred_url":"https://api.github.com/users/sofar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sofar/subscriptions","organizations_url":"https://api.github.com/users/sofar/orgs","repos_url":"https://api.github.com/users/sofar/repos","events_url":"https://api.github.com/users/sofar/events{/privacy}","received_events_url":"https://api.github.com/users/sofar/received_events","type":"User","site_admin":false},"created_at":"2015-12-27T06:15:48Z","updated_at":"2015-12-27T06:15:48Z","body":"OpenAL is designed as a 3d sound mixer, such that sounds coming from the same location can never be stereo, after all the definition of \"stereo\" is hearing 2 sounds coming from different positions. 2 sounds coming from one and the same location will therefore be \"mixed\" together.\r\n\r\nIf you want to convey stereo sound to the player, you will have the following 2 options:\r\n\r\n1. use to_player = <playername>, turning it into a location-less sound (which can be stereo). The sound will only play for that player.\r\n\r\n2. create 2 separate mono sound streams, and play them in 2 different positions in-game. The player will hear stereo.\r\n\r\nPlaying 2 sounds in the same location, or attempting to play a stereo stream as a positional stream may have side effects, as the mixing of audio may vary per architecture, and kcat admits it's an approximation from what I've seen (http://openal.org/pipermail/openal/2015-February/000330.html)\r\n\r\nTL:DR do not play stereo sounds as positional sounds, it's not supported."}}