[GH-ISSUE #2] block=False is not supported in Linux #3

Closed
opened 2026-10-13 19:43:22 +00:00 by bsakaguchi · 5 comments
Owner

Originally created by @0n1cOn3 on GitHub (Apr 15, 2021).
Original GitHub issue: https://github.com/rkk-2s/bad-apple/issues/2

block=False is not supported in Linux, you may need to add an thread to execute playsound():

import threading
...

threading.Thread(target=playsound, args=("tng_bad-apple.mp3",)).start()

Originally created by @0n1cOn3 on GitHub (Apr 15, 2021). Original GitHub issue: https://github.com/rkk-2s/bad-apple/issues/2 block=False is not supported in Linux, you may need to add an thread to execute playsound(): import threading ... threading.Thread(target=playsound, args=("tng_bad-apple.mp3",)).start()
Author
Owner

@rkk-2s commented on GitHub (Apr 15, 2021):

Hey there, wasn't aware of the issue thanks. Though when using threading I ran into synchronization issues, so not really too sure on how to rectify that. Will look into it though.

<!-- gh-comment-id:820354392 --> @rkk-2s commented on GitHub (Apr 15, 2021): Hey there, wasn't aware of the issue thanks. Though when using threading I ran into synchronization issues, so not really too sure on how to rectify that. Will look into it though.
Author
Owner

@timelessnesses commented on GitHub (Apr 17, 2021):

@CalvinLoke you should use the ffmpeg though or just let it record and sent it as video file

<!-- gh-comment-id:821856825 --> @timelessnesses commented on GitHub (Apr 17, 2021): @CalvinLoke you should use the ffmpeg though or just let it record and sent it as video file
Author
Owner

@0n1cOn3 commented on GitHub (Apr 17, 2021):

@CalvinLoke you should use the ffmpeg though or just let it record and sent it as video file

Sounds like a good idea but the project is to show everything in ASCII inside an terminal 😄 So, when you run a cli environment, it could be tricky to show mpv or something else when no GUI has been installed.

<!-- gh-comment-id:821875352 --> @0n1cOn3 commented on GitHub (Apr 17, 2021): > @CalvinLoke you should use the ffmpeg though or just let it record and sent it as video file Sounds like a good idea but the project is to show everything in ASCII inside an terminal 😄 So, when you run a cli environment, it could be tricky to show mpv or something else when no GUI has been installed.
Author
Owner

@rkk-2s commented on GitHub (Apr 20, 2021):

Alright, fixed the issue with v3 by replacing the playsound library with pygame. Tested it, and it was able to run on Linux. Thanks for bringing the issue up! @0n1cOn3

<!-- gh-comment-id:823130181 --> @rkk-2s commented on GitHub (Apr 20, 2021): Alright, fixed the issue with v3 by replacing the playsound library with pygame. Tested it, and it was able to run on Linux. Thanks for bringing the issue up! @0n1cOn3
Author
Owner

@0n1cOn3 commented on GitHub (Apr 20, 2021):

Your welcome.

<!-- gh-comment-id:823428404 --> @0n1cOn3 commented on GitHub (Apr 20, 2021): Your welcome.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rkk-2s/bad-apple#3
No description provided.