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