Open celeritydesign opened 1 month ago
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.
"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.
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 ?
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 :-)
Related issue: https://github.com/pygame-community/pygame-ce/issues/1328
I'm moving it to the 2.5.3 milestone so it's not left behind and I don't forget it.
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!