RaceControl
RaceControl copied to clipboard
[BUG] Internal player freezes when sound output changes
Describe the bug Race Control freezes/crashes when internal player is playing and sound output changes from speaker to just-connected Bluetooth headset.
To Reproduce Steps to reproduce the behavior:
- Play a stream with internal player
- Connect a Bluetooth headset (not sure if it's relevant that it's Bluetooth or not - could well be the case that any change in sound output device triggers this)
- The stream freezes and becomes unresponsive
Expected behavior Sound output changes from speakers to headset
Desktop (please complete the following information):
- v2.3.3 on Windows
Additional context Couldn't find anything interesting in the .log file when it occurs
For me the stream does not actually freeze when connecting a BT headset, but it does not transfer the audio to it. I have to close the feed and open it again. This is happening when I just use the watch button to watch the stream. I think that would be the internal player.
If this is something you want to fix @robvdpol, I can have a look at it if you want.
@robvdpol @fvannee The issue might be in Flyleaf, I have created this issue there to track it.
I got the problem but it worked fine last week. Any Windows Update that cause this problem?
2021-06-28 11:32:45.1423 ERROR An unhandled exception occurred. System.TypeInitializationException: The type initializer for 'FlyleafLib.Master' threw an exception. ---> System.Runtime.InteropServices.COMException (0x80070490): Element not found. (0x80070490) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode) at NAudio.CoreAudioApi.MMDeviceEnumerator.GetDefaultAudioEndpoint(DataFlow dataFlow, Role role) at FlyleafLib.AudioMaster.Initialize() at FlyleafLib.AudioMaster..ctor() at FlyleafLib.Master..cctor() --- End of inner exception stack trace --- at FlyleafLib.Master.RegisterFFmpeg(String absolutePath, Int32 verbosity) at RaceControl.App.Initialize() in D:\Projects\RaceControl\RaceControl\RaceControl\App.xaml.cs:line 63 at Prism.PrismApplicationBase.InitializeInternal() at Prism.PrismApplicationBase.OnStartup(StartupEventArgs e) at RaceControl.App.OnStartup(StartupEventArgs e) in D:\Projects\RaceControl\RaceControl\RaceControl\App.xaml.cs:line 56 at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)