Skip to content
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

pygame.music.play() looping docs consistent with pygame and SDL behaviour #1693

Merged
merged 1 commit into from May 5, 2020

Conversation

MyreMylar
Copy link
Contributor

Changes the pygame docs to correctly describe the existing behaviour of music.play(), which basically mirrors the behaviour of SDLMix_PlayMusic.

In SDL the behaviour of the loops variable is inconsistent between Sounds/Channels and Music and so pygame is too, see the SDL docs for evidence:

SDL Docs:

Mix_PlayMusic: https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC57
Mix_PlayChannel: https://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer.html#SEC28

The docs say they are for Mixer 1.2 but they seem to be using the same docs for SDL 2, and the behaviour is the same.

Downsides:

  • loops variable is inconsistent between Sounds.play() and music.play()

Upsides:

  • We don't break the code of the 8,000 people who are using the loops value in it's current, wrongly documented, fashion.

@MightyJosip MightyJosip linked an issue May 1, 2020 that may be closed by this pull request
@MyreMylar MyreMylar changed the title fixes #375. Makes pygame docs consistent with pygame & SDL fixes #375. Makes pygame.music docs consistent with pygame behaviour & SDL May 2, 2020
@illume illume changed the title fixes #375. Makes pygame.music docs consistent with pygame behaviour & SDL pygame.music.play() looping docs consistent with pygame and SDL behaviour May 2, 2020
Copy link
Member

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks

@illume illume added docs mixer.music pygame.mixer.music labels May 2, 2020
@illume illume merged commit 837a72e into pygame:master May 5, 2020
@MyreMylar MyreMylar deleted the fix-mixer-music-play-loops-docs branch June 5, 2020 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs mixer.music pygame.mixer.music
Projects
None yet
Development

Successfully merging this pull request may close these issues.

incorrect repeats for pygame.mixer.music.play()
2 participants