Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
app-pyaudioplayer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
santiago duque
app-pyaudioplayer
Commits
a58bb1a8
Commit
a58bb1a8
authored
Jan 14, 2025
by
santiago duque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added second button and logic to stop events as a test
parent
95542bc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
main.py
main.py
+1
-6
No files found.
main.py
View file @
a58bb1a8
...
...
@@ -34,7 +34,6 @@ def setup_sounds():
global
contentlist
global
sound_dir
print
(
"inside setup"
)
print
(
contentlist
)
for
content
in
contentlist
:
...
...
@@ -45,14 +44,10 @@ def setup_sounds():
):
sound
=
pygame
.
mixer
.
Sound
(
join
(
sound_dir
,
content
))
sound_array
.
append
(
sound
)
print
(
content
)
print
(
"sound array"
)
print
(
sound_array
)
sound_playing
=
False
def
play_sound
(
index
):
global
sound_playing
global
cut_current_sound
...
...
@@ -69,7 +64,7 @@ def play_sound(index):
channel
=
sound_array
[
current_sound_index
]
.
play
()
while
channel
.
get_busy
():
pygame
.
time
.
wait
(
100
)
# ms
#
pygame.time.wait(100) # ms
print
(
"Playing..."
)
print
(
btn_array
[
current_sound_index
]
.
is_held
)
print
(
btn_array
[
current_sound_index
]
.
is_pressed
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment