[nvda-addons] play silence addon

  • From: derek riemer <driemer.riemer@xxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Fri, 24 Jul 2015 08:36:53 -0600

I am writing that play silence addon. I have found a computer that exibits the behavior that the one person mentioned (if you know who I am talking about, tell me, i don't remember who that was). I almost have it working. The only problem is that the addon doesn't quite work at this point because it locks up when waiting for nvda to play other sounds like the error sound or exit sound.
If anyone would like to take a stab at debugging it, or recommend another way to solve the problem that would be great. Currently i start a worker thread that plays silence constantly. It listens in a queue for the "die",. "wait", and "resume" messages, and if it receives the wait message it temperarily stops playing silence with nvwave, so that nvwave can play another audio file. When it receives resume it starts playing silence again. When it receives die it exits the whole thread (This happens when nvda exits. I don't know much at all about parallel programming so I don't know if this is the correct way to do this. Nvda seems to freeze when i call queue.join in a monkeypatched version of playWaveFile. This is so that I can wait until the other thread stops playing silence and I can safely use nvwave.
It locks nvda into a scarey bind currently and if you don't know what you are doing it will totally just lock your computer up, so DO NOT USE. If nvda plays any wave file at all it will just wate forever. The repo I currently have this in is at https://bitbucket.org/derek_riemer_/play-scilence

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: