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
.
Log
(
activateLogging
)
Sound
.
Log
(
activateLogging
)
Enables/Disables logging of incoming sound requests
Parameters
activateLogging
Boolean
True= activate sound logging/ False Deactivate sound logging
Return
Void

Sound
.
OnFilter
(
p
,
args
)
Sound
.
OnFilter
(
p
,
args
)
Parameters
p
PacketReader
args
PacketHandlerEventArgs
Return
Void

Sound
.
WaitForSound
(
sounds
,
timeout
)
Sound
.
WaitForSound
(
sounds
,
timeout
)
Parameters
sounds
List[Int32]
timeout
Int32
Return
Boolean