Skip to content

Consistent argument naming in play_sound and Sound.play() #1938

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

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions arcade/sound.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def play_sound(
sound: Sound,
volume: float = 1.0,
pan: float = 0.0,
looping: bool = False,
loop: bool = False,
speed: float = 1.0,
) -> Optional[media.Player]:
"""
Expand All @@ -200,7 +200,7 @@ def play_sound(
:param sound: Sound loaded by :func:`load_sound`. Do NOT use a string here for the filename.
:param volume: Volume, from 0=quiet to 1=loud
:param pan: Pan, from -1=left to 0=centered to 1=right
:param looping: Should we loop the sound over and over?
:param loop: Should we loop the sound over and over?
:param speed: Change the speed of the sound which also changes pitch, default 1.0
"""
if sound is None:
Expand All @@ -214,7 +214,7 @@ def play_sound(
" Make sure to use load_sound first, then play the result with play_sound.")

try:
return sound.play(volume, pan, looping, speed)
return sound.play(volume, pan, loop, speed)
except Exception as ex:
print("Error playing sound.", ex)
return None
Expand Down