Beispiel #1
0
 def _play(self, recipients):
     """Play the sound (internal)."""
     engine_sound.emit_sound(
         recipients, self.index, self.channel, self._stream_sample,
         self.volume, self.attenuation, self.flags, self.pitch,
         self.origin, self.direction, self.origins,
         self.update_positions, self.sound_time, self.speaker_entity)
Beispiel #2
0
 def _play(self, recipients):
     """Play the sound (internal)."""
     engine_sound.emit_sound(
         recipients, self.index, self.channel, self._stream_sample,
         self.volume, self.attenuation, self.flags, self.pitch,
         self.origin, self.direction, self.origins,
         self.update_positions, self.sound_time, self.speaker_entity)
Beispiel #3
0
    def play(self, *recipients):
        """Play the sound."""
        # Get the recipients to play the sound to
        recipients = RecipientFilter(*recipients)

        # Is the sound precached?
        if not self.is_precached:

            # Precache the sound
            self.precache()

        # Play the sound
        engine_sound.emit_sound(
            recipients, self.index, self.channel, self.sample,
            self.volume, self.attenuation, self.flags, self.pitch,
            self.origin, self.direction, self.origins,
            self.update_positions, self.sound_time, self.speaker_entity)