I am making an app which relies on the user being able to identify 2 separate sounds, and so it would be ideal if these 2 sounds could be played in each speaker / earphone independently.
I found a guide which said that the openal functions can be accessed in Corona, and as I have already used this to alter the pitch of sounds I’m fairly sure this is correct. I have tried to use the following to make the sound only use 1 speaker, but the sound still uses both speakers:
-- I have tried using values from 1 up to display.contentWidth as the offset value
local soundPos = \_W \* 0.5
--i is always 1 or 2 (i.e. left and right)
if i == 1 then
soundPos = -soundPos
end
--set the x position of the sound source
al.Source(sounds[i].Source, al.POSITION, soundPos, 0.0, 0.0)
--position listener in the middle
al.Listener(al.POSITION, 0.0, 0.0, 0.0)
audio.play(sounds.....etc)
Have I missed something obvious? The sounds play just fine, the only part I’m stuck with is making the position of the sound change.
Thanks in advance. [import]uid: 84115 topic_id: 28686 reply_id: 328686[/import]
[import]uid: 84115 topic_id: 28686 reply_id: 117689[/import]