WasapiOut EventStyle=True causes Exception "Specified argument was out of the range of valid values"

Mar 7, 2015 at 8:53 PM
When using WasapiOut with EventStyle=True and AudioClientShareMode = AudioClientShareMode.Shared, this exception occurs when playing a file:
Exception: Specified argument was out of the range of valid values.
Parameter name: value. StackTrace:    at CSCore.SoundOut.WasapiOut.set_Latency(Int32 value)
   at CSCore.SoundOut.WasapiOut.InitializeInternal()
   at CSCore.SoundOut.WasapiOut.Initialize(IWaveSource source)
   at Dopamine.Core.Audio.CSCorePlayer.PlayASound() in D:\Workspaces\VSOnline\Dopamine\Dev\Dopamine\Dopamine.Core\Audio\CSCorePlayer.vb:line 128
   at Dopamine.Core.Audio.CSCorePlayer.Play(String iUri) in D:\Workspaces\VSOnline\Dopamine\Dev\Dopamine\Dopamine.Core\Audio\CSCorePlayer.vb:line 212
   at Dopamine.Services.PlaybackService.TryPlay(TrackInfo iTrack) in D:\Workspaces\VSOnline\Dopamine\Dev\Dopamine\Dopamine.Services\Playback\PlaybackService.vb:line 396
This doesn't happen when using EventStyle=True and AudioClientShareMode = AudioClientShareMode.Exclusive.

Is it always required to use EventStyle=True with AudioClientShareMode.Exclusive?
Coordinator
Mar 8, 2015 at 8:55 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.