0

okaayy so im working on a music player but it not working as i want so the problem is when i play the music using the playsound library it blocks the code from running and freezes the tkinter window but i searched and found out that you can set block to False but when it set to false the music doesn't play.

here is the code:

from playsound import playsound as psound
#a loop here where i get the directory of musics and create a button for every music and each of the button's command value is set to the 'play_sound' function and passing the music directory as argument
    def play_aux(self, dir):
        psound(dir, False)
SwirX
  • 21
  • 7
  • 2
    Please provide a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). Also specify any third party libraries and links to external resources that you are referencing. – quartzic Jun 16 '22 at 18:29
  • okayy umm i took some code out is it good now or should i add the loop? – SwirX Jun 16 '22 at 21:13

1 Answers1

-1

Okay so i got it working but idk how to check if the sound is still playing so i switched to pygame and it working fine for me!

SwirX
  • 21
  • 7