Exemplo n.º 1
0
    def __init__(self):
        self.source = al.ALuint(0)
        al.alGenSources(1, self.source)

        al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, 0)
        al.alSourcei(self.source, al.AL_SOURCE_RELATIVE, 0)

        self.state = al.ALint(0)

        self._volume = 1.0
        self._pitch = 1.0
        self._position = [0, 0, 0]
        self._rolloff = 1.0
        self._loop = False
        self.queue = []
Exemplo n.º 2
0
    def __init__(self):
        self.source = al.ALuint(0)
        al.alGenSources(1, self.source)

        al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, 0)
        al.alSourcei(self.source, al.AL_SOURCE_RELATIVE, 0)

        self.state = al.ALint(0)

        self._volume = 1.0
        self._pitch = 1.0
        self._position = [0, 0, 0]
        self._rolloff = 1.0
        self._loop = False
        self.queue = []
Exemplo n.º 3
0
 def __init__(self):
     #load source player
     self.source = al.ALuint(0)
     al.alGenSources(1, self.source)
     #disable rolloff factor by default
     al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, 0)
     #disable source relative by default
     al.alSourcei(self.source, al.AL_SOURCE_RELATIVE, 0)
     #capture player state buffer
     self.state = al.ALint(0)
     #set internal variable tracking
     self._volume = 1.0
     self._pitch = 1.0
     self._position = [0, 0, 0]
     self._rolloff = 1.0
     self._loop = False
     self.queue = []
Exemplo n.º 4
0
 def __init__(self):
     # load source player
     self.source = al.ALuint(0)
     al.alGenSources(1, self.source)
     # disable rolloff factor by default
     al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, 0)
     # disable source relative by default
     al.alSourcei(self.source, al.AL_SOURCE_RELATIVE, 0)
     # capture player state buffer
     self.state = al.ALint(0)
     # set internal variable tracking
     self._volume = 1.0
     self._pitch = 1.0
     self._position = [0, 0, 0]
     self._rolloff = 1.0
     self._loop = True
     self.queue = []
Exemplo n.º 5
0
 def set_cone_inner_angle(self, cone_inner_angle):
     al.alSourcef(self._al_source, al.AL_CONE_INNER_ANGLE, cone_inner_angle)
Exemplo n.º 6
0
 def set_pitch(self, pitch):
     al.alSourcef(self._al_source, al.AL_PITCH, max(0, pitch))
Exemplo n.º 7
0
 def _set_max_gain(self, max_gain):
     al.alSourcef(self._al_source, al.AL_MAX_GAIN, max(0, max_gain))
     self._max_gain = max_gain
Exemplo n.º 8
0
 def _set_pitch(self, pit):
     self._pitch = pit
     al.alSourcef(self.source, al.AL_PITCH, pit)
Exemplo n.º 9
0
 def _set_pitch(self, pit):
     self._pitch = pit
     al.alSourcef(self.source, al.AL_PITCH, pit)
Exemplo n.º 10
0
 def set_cone_outer_angle(self, cone_outer_angle):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_ANGLE, cone_outer_angle)
Exemplo n.º 11
0
 def set_cone_inner_angle(self, cone_inner_angle):
     al.alSourcef(self._al_source, al.AL_CONE_INNER_ANGLE, cone_inner_angle)
Exemplo n.º 12
0
 def set_pitch(self, pitch):
     al.alSourcef(self._al_source, al.AL_PITCH, max(0, pitch))
Exemplo n.º 13
0
 def set_max_distance(self, max_distance):
     al.alSourcef(self._al_source, al.AL_MAX_DISTANCE, max_distance)
Exemplo n.º 14
0
 def set_min_distance(self, min_distance):
     al.alSourcef(self._al_source, al.AL_REFERENCE_DISTANCE, min_distance)
Exemplo n.º 15
0
 def set_volume(self, volume):
     al.alSourcef(self._al_source, al.AL_GAIN, max(0, volume))
Exemplo n.º 16
0
 def set_cone_outer_angle(self, cone_outer_angle):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_ANGLE, cone_outer_angle)
Exemplo n.º 17
0
 def set_cone_outer_gain(self, cone_outer_gain):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_GAIN, cone_outer_gain)
Exemplo n.º 18
0
 def set_cone_outer_gain(self, cone_outer_gain):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_GAIN, cone_outer_gain)
Exemplo n.º 19
0
 def _set_rolloff(self, value):
     self._rolloff = value
     al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, value)
Exemplo n.º 20
0
 def set_volume(self, volume):
     al.alSourcef(self._al_source, al.AL_GAIN, max(0, volume))
Exemplo n.º 21
0
 def _set_volume(self, vol):
     self._volume = vol
     al.alSourcef(self.source, al.AL_GAIN, vol)
Exemplo n.º 22
0
 def set_min_distance(self, min_distance):
     al.alSourcef(self._al_source, al.AL_REFERENCE_DISTANCE, min_distance)
Exemplo n.º 23
0
 def _set_rolloff(self, value):
     self._rolloff = value
     al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, value)
Exemplo n.º 24
0
 def set_max_distance(self, max_distance):
     al.alSourcef(self._al_source, al.AL_MAX_DISTANCE, max_distance)
Exemplo n.º 25
0
 def _set_volume(self, vol):
     self._volume = vol
     al.alSourcef(self.source, al.AL_GAIN, vol)
Exemplo n.º 26
0
 def _set_min_gain(self, min_gain):
     al.alSourcef(self._al_source, al.AL_MIN_GAIN, max(0, min_gain))
     self._min_gain = min_gain