Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Cooperative Cuisine Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Social Cognitive Systems
CoCoSy
Cooperative Cuisine Environment
Commits
4615667c
Commit
4615667c
authored
1 year ago
by
Fabian Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
Switched from simpleaudio to pygame to play sound
parent
7d660fad
No related branches found
No related tags found
2 merge requests
!62
Resolve "Game Flow"
,
!61
Resolve "Beep on button for audio sync"
Pipeline
#46315
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
overcooked_simulator/gui_2d_vis/overcooked_gui.py
+6
-5
6 additions, 5 deletions
overcooked_simulator/gui_2d_vis/overcooked_gui.py
setup.py
+0
-1
0 additions, 1 deletion
setup.py
with
6 additions
and
6 deletions
overcooked_simulator/gui_2d_vis/overcooked_gui.py
+
6
−
5
View file @
4615667c
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
0
−
1
View file @
4615667c
...
...
@@ -23,7 +23,6 @@ requirements = [
"
websockets>=12.0
"
,
"
requests>=2.31.0
"
,
"
platformdirs>=4.1.0
"
,
"
simpleaudio
"
,
]
test_requirements
=
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment