The Y value is arbitrary, unless you plan on setting a height value in your side scroller, you could set it to whatever you like as long as the listener and sound are of the same value. Given that you may be playing around with distances that increment by values of 1, maybe you should consider adjusting the roll off factor a bit higher. As an example, I've adjusted the 3D audio example a little:
from openal import *
import time
class Example(object):
def __init__(self):
#load listener
self.listener = Listener()
#initialize sound
self.sound = LoadSound('tone5.wav')
#load sound player
self.player = Player()
#set listener position
self.listener.position = (0,240,0)
#set player position
self.player.position = (0,240,0)
#load sound into player
self.player.add(self.sound)
#enable loop sound so it plays forever
self.player.loop = True
#set rolloff factor
self.player.rolloff = 1.0
#play sound
self.player.play()
#move sound from left to right
for a in range(-5,5,1):
self.player.position = (a,240,0)
time.sleep(1)
#stop player
self.player.stop()
#clean up resources
self.player.delete()
self.sound.delete()
self.listener.delete()
Example()