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

Docs typo: mixer.Sound #3180

Open
celeritydesign opened this issue Oct 17, 2024 · 6 comments
Open

Docs typo: mixer.Sound #3180

celeritydesign opened this issue Oct 17, 2024 · 6 comments

Comments

@celeritydesign
Copy link

celeritydesign commented Oct 17, 2024

ref: https://pyga.me/docs/ref/mixer.html

What should this say? :

"The Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback."

For context, I'm looking to make copies ( copy.copy() )of Sound objects from a cached dictionary, and am getting "cannot pickle Sound" errors. It would be great if the docs could address this.

Cheers!

@bilhox
Copy link
Contributor

bilhox commented Oct 17, 2024

For context, I'm looking to make copies ( copy.copy() )of Sound objects from a cached dictionary, and am getting "cannot pickle Sound" errors. It would be great if the docs could address this.

This is not possible right now, but I started an implementation a few weeks ago, I still have some bugs to fix. You can turn yourself to sndarray though.

What should this say? :
"The Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback."

Good question.

@MrRedstone058
Copy link
Contributor

"The Sound object represents actual sound sample data. Methods that change the state of the Sound object will the all instances of the Sound playback."

will the all --> alter, perhaps.

@bilhox bilhox added docs mixer pygame.mixer labels Oct 17, 2024
@celeritydesign
Copy link
Author

This is not possible right now, but I started an implementation a few weeks ago, I still have some bugs to fix. You can turn yourself to sndarray though.

That sounds great! I'm hoping you are either going to make it possible to copy.deepcopy(mysound) and/or add a Sound.copy() method ?

@celeritydesign
Copy link
Author

celeritydesign commented Oct 17, 2024

For the docs, maybe something like:

The Sound object represents actual sound sample data. Methods that change the state of the Sound object will alter all instances of the Sound playback.
Note, it is not currently possible to shallow copy or deep copy Sound objects. For multiple instances of the same sound that need to loop and play independently it is recommended to...

It's the recommendation that I am not sure about - at the moment I am just reloading the same sound file multiple times :-)

@celeritydesign
Copy link
Author

Related issue: #1328

@bilhox
Copy link
Contributor

bilhox commented Oct 17, 2024

I'm moving it to the 2.5.3 milestone so it's not left behind and I don't forget it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants