Trying out/testing the use of multiple threading.Thread objects to play sounds 
using winsound.PlaySound function, and in order to be able to play multiple 
sounds at the same time/near enough to each other, I am trying out implementing 
a separate thread to call the function that handles this, but just wondering 
about the easiest way to then restart/rerun a thread, and/or if it's really 
possible/viable to in fact stop a thread while/if it's running..?

Have it currently set to recreate a new thread each time I want it to in fact 
play a sound, and while this doesn't seem to thus far have made the python.exe 
task start to build up it's memory usage etc. in the task manager, I would just 
think that you could at the least, either stop a thread if it's currently 
running (threading.Thread.isAlive)() function) and/or then restart it, but it 
seems to want to then return an exception that the thread can't be restarted?

Alternatively, I suppose I could also assign each thread to a class that then 
replays the winsound object, or something, but just wondering in general if 
there's an easier way to stop/restart a Thread object/item?

Lastly, it otherwise seems quite happy/comfortable to run multiple threads/play 
multiple sounds at the same time/near enough to each other, which is nice.

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to