music now loop indefinitely

This commit is contained in:
study-faraphel 2025-02-02 15:01:45 +01:00
parent ad49484de9
commit a8365887d7

View file

@ -45,8 +45,8 @@ class MasterRole(base.BaseActiveRole):
# TODO(Faraphel): share the secret key generated with the other *allowed* peers ! How to select them ? A file ?
# TODO(Faraphel): check if another server is emitting sound in the network. Return to undefined if yes
# get the current chunk
chunk = self.chunks[self.chunk_count]
# get the current chunk (loop indefinitely)
chunk = self.chunks[self.chunk_count % len(self.chunks)]
# broadcast it in the network
audio_packet = AudioPacket(