pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
909 stars 147 forks source link

pygame.mixer.Sound.copy (2577) #1328

Open GalacticEmperor1 opened 1 year ago

GalacticEmperor1 commented 1 year ago

Issue №2577 opened by fortwoone at 2021-05-04 15:38:39

I noticed there were copy protocols for some important Pygame objects, such as Surfaces and Rects. I wondered if it would have some interest to add one to Sound objects too, because it would help in some situations, for example if you don't want to use imported sounds directly (also to avoid direct instance editing as we may encounter with Surfaces if we don't copy them before editing)...


Comments

*fortwoone commented at 2021-05-13 19:00:45*

And so I found a technique to copy Sound objects without using a copy method : you only need to make an array from the source Sound and then make another Sound object from the array


*illume commented at 2021-05-22 20:12:49*

Would be useful to me too.


*fortwoone commented at 2021-05-23 10:36:01*

Would be useful to me too.

Do you want me to give you my piece of code ?

bilhox commented 2 weeks ago

hi, I implemented it 2 weeks ago in my side, but didn't have time to fix some bugs. At least it is coming soon.