Sound
The Sound class provides an api to manipulate Sounds.
For now it just turns logging for sounds on / off or waits for a list of sounds
All the WeakRef stuff seems like overkill and a pia.
The problem was if you started the wait and then killed the python script, the entry in the waiters list just stayed forever
The only way around this is to have a weakref stored in the list, then if the local var ManualResetEvent went out of scope,
the WeakRef will go to null. At end of loop we clean up all null entries so the list stays clean.
TODO: Sound Constructors
Methods
Sound.AddFilter(name, sounds)
Sound.AddFilter(name, sounds)
Parameters
nameString
soundsList[Int32]
Sound.Log(activateLogging)
Sound.Log(activateLogging)
Enables/Disables logging of incoming sound requests
Parameters
activateLoggingBooleanTrue= activate sound logging/ False Deactivate sound logging
Sound.OnFilter(p, args)
Parameters
pPacketReader
argsPacketHandlerEventArgs
Sound.RemoveFilter(name)
Removes a filter of incoming sound requests
Parameters
nameStringThe name of the filter to be removed
Sound.WaitForSound(sounds, timeout)
Sound.WaitForSound(sounds, timeout)
Parameters
soundsList[Int32]
timeoutInt32