NVDA Audio player library need to be improved?

DaVid
 

Hi there!

Sumary: the current wavePlayer has high latency on some sound cards.
Also the delay to reset the player (when player.stopis called) is
extremely high when using stereo mode (2 channels).

1. latency: This usually happens on most modern realtec drivers, that
are present in majority of computers. The latency affects the general
usability. I usually replace the original realtec drivers, but not all
users know how to do this. I also lose functionality by doing this.

2. stop method: The delay of stop method is very anoying when use the
tones library. E.G. when using the track mouse movement sound. Even
this thing interrupts the current speaking voice.

3. Soundcard output and general NVDA's volume: currently users can
adjust the volume for synthesizers only. Sometimes when I decrease the
synth volume, my ears are hurt cause of the other NVDA's sounds.

Possible solution for latency: Use a more direct audio mode, the user
could choose between modes according their needs. Windows have MME,
DirectSound, wasapi modes. At least in wasapi, the buffer can be
changed. So, the user can modify that.

For stop player issue, we could avoid to call this method or implement
an internal method to stop the audio without reset the device. I
implemented an aproach for the tones library that works properly.
Download my tones library here. Use it on your own risk, is just a
experimental add-on.
https://fromsmash.com/-G4UEonUeX-c0

For general volume, an user has developed a plug-in to solve it, but
it shouldn't be solved by plug-ins.

How did I discover this?

The past week an user reported to me an issue with my add-on called
beepKeyboard. I was unable to reproduce his issue because I tested it
on all my computers and worked correctly. Worked because I don't have
the original realtec drivers.

some days ago I received a very small laptop with a fresh copy of
windows 10 and the issues appeared.
Its worse when using this laptop in battery mode.

the sound feature of the mouse movement worked incorrectlytoo, so the
issue is not in my add-on. The synthesizer is interrupted when NVDA
plays a tone.
Then I did a simple two tests.
1. Play a tone beep from console. The delay between I send the command
and the tone was played, is very high.
2. Opened the console, and set a timer to play a tone in 1 second.
Then I read a text with the current synth, and the tone interrupted
the synth when speaking.

I thought that the issue was in the tones library,so I wrote my own
tones library. It worked correctly on mono, but when I set it to
stereo, the issues were the same.

Then I solved it sending small chunks of audio to the player in a
background thread. By this way,I can control the stop functionality of
a beep without using player.stop method.
I send this libraryin an add-on to some users, worked correctly for
them in all cases. No latency, no synth interruptions.

P.S: sorry for sending this to both lists. Is a priority issue I
think.And the devel list is not very read in my opinion.

Cheers,
DaVid.

Join nvda-devel@groups.io to automatically receive all group messages.