baykovr / AVPI

an open source voice command macro software
https://baykovr.github.io/gavpi.html
GNU General Public License v3.0
198 stars 42 forks source link

WAV File Playback Only Plays Once #54

Closed baykovr closed 8 years ago

baykovr commented 8 years ago

Reported that, 32bit .wav files only trigger and play once for Play_Sound action types.

Expected behavior: sound files are played on every invocation. Actual behavior: the sound file plays only on the first invocation.

Tim0theus commented 8 years ago

I forked your branch and added a RandomPicker. As I noticed, that a file only played once I added:

                wavePlayer.Pause();
                audioFileReader.Seek(0, System.IO.SeekOrigin.Begin);

in the run() of the Play_Sound action class, before the init and it worked for me.

baykovr commented 8 years ago

Fixed via 6d93259445e06b691448e2fd0baccc43eb9acf1d (pulled in your changes).