-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix playmus.py example (broken in 2.0.1) #2738
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great!
Think it would be prettier with some different colors? The blue on white isn't the prettiest on the eyes.
If I play a .wav I can't rewind, but if I play a .mp3 I can? Also another thing I've found that isn't ideal- you can't close the window when in a paused state. |
Thanks I'll resubmit with updated color scheme and I've fixed the being able to quit when a track is paused. I'll have a look at not being able to rewind a wav but I'm getting the same, could be a deeper issue causing that one. |
@Starbuck5 I checked the SDL_Mixer docs and it states rewind only works for MOD, OGG, MP3, and Native MIDI. Presume that's still the case, although their website seems to indicate the latest version of SDL_Mixer is version 2.0.4 yet the docs don't appear to have been updated in a long time (they refer to SDL_mixer version 1.2.10, dated November 2009!) |
Fixed issue where music is paused, the program couldn't be exited. Change colors for background and text.
Thanks for all the investigation! The SDL_Mixer docs are old but it has a very stable interface throughout the years. However, sometimes you have to dig into the SDL_Mixer source directly to see how things fit together. Maybe we should add a note that WAV doesn't support rewind to the mixer.music docs. |
@Starbuck5 I've fixed this so that playmus.py will use rewind for MOD, MP3 and WAV files, and for anything else will restart (using I had a go at updating the docs for |
…ported types Updated to use play() to restart file types that don't support rewind(). Updated docs to note supported file types which are limited
That's because you're using an old version of main, from like August. |
Ah yeah, I was able to check the docs built correctly on my Mac machine instead. |
Closing this so I can rebase code and will then raise a new PR |
This PR is to fix an issue with the bundled example file playmus.py which stopped working correctly as of pygame 2.0.1 due to a change in returning False for
pygame.mixer.music.get_busy()
when music is paused (previously returned True).Also tidied up the wording a little bit and fixed a typo.
Issue was raised #2734