from source import packets from source.behaviors.events import base class AudioEvent(base.BaseEvent): """ Event reacting to receiving audio data. """ def handle(self, packet: packets.AudioPacket, address: tuple): # add the audio chunk to the buffer of audio packet to play self.manager.audio.add_audio(packet)