예제 #1
0
파일: OpenAL.py 프로젝트: anden3/Python
    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 = []
예제 #2
0
파일: OpenAL.py 프로젝트: anden3/Python
    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 = []
예제 #3
0
파일: OpenAL_HRTF.py 프로젝트: shaix/PyAL
 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 = []
예제 #4
0
파일: sound.py 프로젝트: vktrbhm/HRTF_Micro
 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 = []
예제 #5
0
 def set_cone_inner_angle(self, cone_inner_angle):
     al.alSourcef(self._al_source, al.AL_CONE_INNER_ANGLE, cone_inner_angle)
예제 #6
0
 def set_pitch(self, pitch):
     al.alSourcef(self._al_source, al.AL_PITCH, max(0, pitch))
예제 #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
예제 #8
0
파일: OpenAL_HRTF.py 프로젝트: shaix/PyAL
 def _set_pitch(self, pit):
     self._pitch = pit
     al.alSourcef(self.source, al.AL_PITCH, pit)
예제 #9
0
파일: OpenAL.py 프로젝트: anden3/Python
 def _set_pitch(self, pit):
     self._pitch = pit
     al.alSourcef(self.source, al.AL_PITCH, pit)
예제 #10
0
 def set_cone_outer_angle(self, cone_outer_angle):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_ANGLE, cone_outer_angle)
예제 #11
0
 def set_cone_inner_angle(self, cone_inner_angle):
     al.alSourcef(self._al_source, al.AL_CONE_INNER_ANGLE, cone_inner_angle)
예제 #12
0
 def set_pitch(self, pitch):
     al.alSourcef(self._al_source, al.AL_PITCH, max(0, pitch))
예제 #13
0
 def set_max_distance(self, max_distance):
     al.alSourcef(self._al_source, al.AL_MAX_DISTANCE, max_distance)
예제 #14
0
 def set_min_distance(self, min_distance):
     al.alSourcef(self._al_source, al.AL_REFERENCE_DISTANCE, min_distance)
예제 #15
0
 def set_volume(self, volume):
     al.alSourcef(self._al_source, al.AL_GAIN, max(0, volume))
예제 #16
0
 def set_cone_outer_angle(self, cone_outer_angle):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_ANGLE, cone_outer_angle)
예제 #17
0
 def set_cone_outer_gain(self, cone_outer_gain):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_GAIN, cone_outer_gain)
예제 #18
0
 def set_cone_outer_gain(self, cone_outer_gain):
     al.alSourcef(self._al_source, al.AL_CONE_OUTER_GAIN, cone_outer_gain)
예제 #19
0
파일: OpenAL.py 프로젝트: anden3/Python
 def _set_rolloff(self, value):
     self._rolloff = value
     al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, value)
예제 #20
0
 def set_volume(self, volume):
     al.alSourcef(self._al_source, al.AL_GAIN, max(0, volume))
예제 #21
0
파일: OpenAL.py 프로젝트: anden3/Python
 def _set_volume(self, vol):
     self._volume = vol
     al.alSourcef(self.source, al.AL_GAIN, vol)
예제 #22
0
 def set_min_distance(self, min_distance):
     al.alSourcef(self._al_source, al.AL_REFERENCE_DISTANCE, min_distance)
예제 #23
0
파일: OpenAL_HRTF.py 프로젝트: shaix/PyAL
 def _set_rolloff(self, value):
     self._rolloff = value
     al.alSourcef(self.source, al.AL_ROLLOFF_FACTOR, value)
예제 #24
0
 def set_max_distance(self, max_distance):
     al.alSourcef(self._al_source, al.AL_MAX_DISTANCE, max_distance)
예제 #25
0
파일: OpenAL_HRTF.py 프로젝트: shaix/PyAL
 def _set_volume(self, vol):
     self._volume = vol
     al.alSourcef(self.source, al.AL_GAIN, vol)
예제 #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