Closed flyingcroissant closed 10 years ago
Related to Issue 39.
Looks good, just a few things I noticed while looking through the code.
System.IO.Path.GetDirectoryName
for the SoundPackFolder settings item, as long paths will otherwise overflow. Alternatively, we should set an overflow mode on the text box which makes sense (pre-ellipsis for example).Logic.Configuration
and in doing so decide whether or not to play a sound. More specifically, in the PTA case we should probably not play a Stopped Listening sound if we received a command from the user. This should be possible by keeping track of the current state (Listening, Not Listening, Command Received).I'll compile and test everything a bit later to make sure, but otherwise I'm happy :+1:
I've added basic support for playing the following sound effects:
I added some UI to the Settings page to choose None, Default, or Sound Pack sound effects. If they select Sound Pack, a folder browser dialog will be displayed. Any missing files will be ignored (ie. if no file is supplied, no sound will be played). The UI could probably be improved, but this is my first crack.
I also included some basic sounds as the Default set which I created with Audacity. We may want to tweak these to be easier to tell apart.
One current issue with the sound playback is that there is no ordering to the playback. For example, the Command Rejected sound might play before or after the Stopped Listening sound. We might be able to add a priority queue or something to add ordering for the sounds.
Another limitation is that the .NET SoundPlayer class I'm using is limited to WAV file playback.