Skip to content
Snippets Groups Projects

Resolve "Beep on button for audio sync"

Merged Fabian Heinrich requested to merge 94-beep-on-button-for-audio-sync into 91-game-flow
2 files
+ 6
6
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -13,8 +13,8 @@ import numpy as np
import pygame
import pygame_gui
import requests
import simpleaudio
import yaml
from pygame import mixer
from websockets.sync.client import connect
from overcooked_simulator import ROOT_DIR
@@ -1024,10 +1024,11 @@ class PyGameGUI:
websocket.close()
def play_bell_sound(self):
wave_obj = simpleaudio.WaveObject.from_wave_file(
str(ROOT_DIR / "gui_2d_vis" / "sync_bell.wav")
)
wave_obj.play()
bell_path = str(ROOT_DIR / "gui_2d_vis" / "sync_bell.wav")
mixer.init()
mixer.music.load(bell_path)
mixer.music.set_volume(0.9)
mixer.music.play()
log.log(logging.INFO, "Started game, played bell sound")
def start_pygame(self):
Loading