(Apr 3, 2018 02:43 AM)SlowMehMo Wrote: This would be difficult to accomplish without a library or something to help you out.
try out naudio, there is good documentation apparently, i see what you mean tho it is hard to find some answers on google.
I'll have a look. It can obviously be done, I just lack knowledge about the subject. One would think there were already functions for this somewhere.
For anyone having similar issues you should be able to play sound files with specific audio devices with both NAudio(not looked up how) and Irrklang.
Example for Irrklang:
Code
'Get the list of installed sound devices.
dim sdl = new IrrKlang.ISoundDeviceList(IrrKlang.SoundDeviceListType.PlaybackDevice)
'Add each device to a combo box.
For i As Integer = 0 to sdl.DeviceCount
comboBox1.Items.Add(sdl.getDeviceDescription(i) + "\n")
Next
'Place this code in your play sound event handler.
'Create a sound engine for the selected device (uses the ComboBox index to get device ID).
irrKlangEngine = new IrrKlang.ISoundEngine(IrrKlang.SoundOutputDriver.AutoDetect, _
IrrKlang.SoundEngineOptionFlag.DefaultOptions, _
sdl.getDeviceID(comboBox1.SelectedIndex))
'Play the selected file
playSelectedFile(fileName)
Now my new problem is figuring out how to use this with the SAPI speechLib...