PDA

View Full Version : Spotter speech stopped during race - Exception BadDeviceId



Seven Smiles
18-01-2019, 21:53
[V 4.9.6.2, rFactor 2]
It was working fine then I was just getting the "squelch" noise at each of a message but no voice in between. The log is filled with exceptions like this for each wav file used:

21:43:11.214 : Exception BadDeviceId calling waveOutOpen playing sound C:\Users\tony_\AppData\Local\CrewChiefV4\sounds\pe rsonalisations\Tony\prefixes_and_suffixes\come_on\ 8.wav stack trace at NAudio.Wave.WaveOut.Init(IWaveProvider waveProvider)
at CrewChiefV4.Audio.SingleSound.LoadNAudioWaveOut() in c:\projects\crewchief_c_sharp\CrewChiefV4\CrewChie fV4\Audio\Sounds.cs:line 1504
at CrewChiefV4.Audio.SingleSound.PlayNAudio() in c:\projects\crewchief_c_sharp\CrewChiefV4\CrewChie fV4\Audio\Sounds.cs:line 1437

Complete log: 183

The Iron Wolf
18-01-2019, 23:25
[V 4.9.6.2, rFactor 2]
It was working fine then I was just getting the "squelch" noise at each of a message but no voice in between. The log is filled with exceptions like this for each wav file used:

21:43:11.214 : Exception BadDeviceId calling waveOutOpen playing sound C:\Users\tony_\AppData\Local\CrewChiefV4\sounds\pe rsonalisations\Tony\prefixes_and_suffixes\come_on\ 8.wav stack trace at NAudio.Wave.WaveOut.Init(IWaveProvider waveProvider)
at CrewChiefV4.Audio.SingleSound.LoadNAudioWaveOut() in c:\projects\crewchief_c_sharp\CrewChiefV4\CrewChie fV4\Audio\Sounds.cs:line 1504
at CrewChiefV4.Audio.SingleSound.PlayNAudio() in c:\projects\crewchief_c_sharp\CrewChiefV4\CrewChie fV4\Audio\Sounds.cs:line 1437

Complete log: 183
Hi,
Any reason you are using NAudio audio output? If you are using Win10 build 1803 or later, you could redirect audio output using built in audio redirection. NAudio code path is not well tested, is resource hungry and I would even guess we are likely to remove it in the future versions, especially since Win10 has built in routing capability. So my suggestion would be to turn nAudio output off and use windows built in stuff instead.

Are you using some sort of wireless device for output?

mr_belowski
19-01-2019, 08:00
from the error message it appears that something has caused your audio devices to get re-enumerated. When the app first starts it reads the audio device ID (just a number starting at zero which is basically the position in the list of the selected device) and it uses this device ID from that point on. It appears that the device is no longer present, or has been moved to a different position in the list.

There's not a lot we can do to code around this - like my esteemed colleague has said, if you can use the built in windows stuff we strongly recommend it over nAudio

Seven Smiles
19-01-2019, 16:04
No reason that I know of for using NAudio, was that the default at some time? I don't remember selecting it. Anyway, I've turned it off. FYI I'm using an Oculus Rift and CC has been working fine for ages - thank you and thanks for the replies.