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]
Return
Void
Sound.Log(activateLogging)
Sound.Log(activateLogging)
Enables/Disables logging of incoming sound requests
Parameters
activateLoggingBoolean
True= activate sound logging/ False Deactivate sound logging
Return
Void
Sound.OnFilter(p, args)
Sound.OnFilter(p, args)
Parameters
pPacketReader argsPacketHandlerEventArgs
Return
Void
Sound.RemoveFilter(name)
Sound.RemoveFilter(name)
Removes a filter of incoming sound requests
Parameters
nameString
The name of the filter to be removed
Return
Void
Sound.WaitForSound(sounds, timeout)
Sound.WaitForSound(sounds, timeout)
Parameters
soundsList[Int32] timeoutInt32
Return
Boolean