INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Blue Screen - Kodi (exclusive) + MC WDM  (Read 6308 times)

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Blue Screen - Kodi (exclusive) + MC WDM
« on: October 24, 2017, 11:32:24 am »

Hello,

Unfortuanetely when using Kodi with JRiver MC as sound processor, I often get a bluescreen. When I chose the wdm driver via directsound mode, no problems occur. Why does the WASAPI access crash?

Regards
Jens
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #1 on: October 24, 2017, 12:21:12 pm »

There are  also  reports of BSOD crashes with foobar and Tidal when accessing WDM in exclusive mode. With Tidal I saw 5 crashes, 4 within the OS and one with the WDM driver itself.  Really seems like there may be a problem with exclusive mode in WDM.


I have 5 recorded crashes over the last 2 days. I have minidumps for them but no JRiver logs.  Four of the crashes point to OS components and one points to WDM.  I can provide the minidumps if anyone wants to look at them in more details. 

RD James reported a BSOD error with foobar and gave the error as a BAD_POOL_HEADER BSOD.  I got 2 of those, although in different places.

Here is some base information from the minidumps.


BAD_POOL_HEADER                                           ntoskrnl.exe               NT Kernel & System

SYSTEM_THREAD_EXCEPTION_NOT_HANDLED     ntoskrnl.exe               NT Kernel & System

BAD_POOL_HEADER                                           fltmgr.sys                  Microsoft Filesystem Filter Manager

BUGCODE_USB_DRIVER                                     USBPORT.SYS            USB 1.1 & 2.0 Port Driver

DRIVER_IRQL_NOT_LESS_OR_EQUAL                 JRiverWDMDriver.sys   JRiver WDM Driver

There have recently been reports of BSODs with TIDAL playback, which have been pointed at them.
I've now tried Exclusive Mode in Foobar2000 v1.3.16 and the WASAPI v3.3 component. (currently the latest version)
As soon as I try Exclusive Mode playback I get a BAD_POOL_HEADER BSOD.
This is with the 64-bit player, I don't know if the 32-bit player is also affected. I'm not prepared to test this on my main system.
 
For now, I am disabling Exclusive Mode for the WDM Driver, but this seems like a big issue.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #2 on: October 26, 2017, 10:03:55 am »

Bump -  It really seems that there might be something wrong with WDM in exclusive mode. Any suggestions?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #3 on: October 26, 2017, 10:15:08 am »

What happens if you turn off exclusive mode?
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #4 on: October 26, 2017, 10:36:14 am »

With Tidal, it works with exclusive mode off but that means the Window mixers is  in play and everything gets resampled to the Windows shared sample rate. Also, in Tidal it means MQA files are not decoded.

I got MC22 as a source connected to MC23  to use WDM in exclusive mode, but these other sources crash. Note that one of the crashes was within the WDM driver itself. I have Windows minidumps if anyone wants to look at them.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #5 on: October 26, 2017, 10:44:46 am »

With Tidal, it works with exclusive mode off but that means the Window mixers is  in play and everything gets resampled to the Windows shared sample rate.
don't think that's correct.  Exclusive just means that no other application can use the WASAPI interface at the same time.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #6 on: October 26, 2017, 10:57:45 am »

I am basing this on what Hendrik said in one of the threads on this topic

https://yabb.jriver.com/interact/index.php/topic,112524.msg778738.html#msg778738

"Unless you can get the playback application (ie. the browser) into exclusive mode, then its always going to hit the windows mixer and get possibly re-sampled to the rate the WDM driver is set to. There is no way to fix that other then the browser using exclusive mode, which seems a rather unlikely feature for them to add. Its simply impossible otherwise. By the time anything gets to the audio, its already been processed by Windows."
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10935
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #7 on: October 26, 2017, 11:05:16 am »

This is true, exclusive mode is the only way to avoid the mixer (and hence be bitexact). Its a consequence of allowing multiple applications to output audio - once you do that, you need to be able to mix their audio into one final stream.
Logged
~ nevcairiel
~ Author of LAV Filters

stewart_pk

  • Citizen of the Universe
  • *****
  • Posts: 653
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #8 on: October 26, 2017, 07:59:18 pm »


Unfortuanetely when using Kodi with JRiver MC as sound processor, I often get a bluescreen. When I chose the wdm driver via directsound mode, no problems occur. Why does the WASAPI access crash?


I think I've seen the same thing when using WASAPI instead of DirectSound with the program that feeds the MC WDM Driver.
Logged

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #9 on: October 27, 2017, 06:38:10 am »

thank You for your messages, but how to to archieve now the bit perfect delivery to JRiver. Maybe one can use the ASIO Driver of JRiver with an asiobridge driver? https://www.kvraudio.com/product/hifi-cable-and-asio-bridge-by-vb-audio



Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #10 on: October 27, 2017, 05:59:48 pm »

I would like to see the WDM Driver in Exclusive Mode fixed, as it fundamentally affects the way I use MC. Did I hear you ask, How? Well.

If I choose to use MC for all DSP, including importantly Room Correction, then I have to turn off all similar processing in my audio hardware. This is my preferred option, as it is much easier to manage DSP and switch effects used in MC than it is using my AVR. At the moment that means my AVR has to have No Sound Fields, no Room Correction, and no other DSP set up. I am sending it Dolby Digital so that I can have 5.1 audio over a Toslink optical cable, so it does the decoding, but that is all.

However, if I want to play video or listen to audio using any source other than MC, such as iView etc. (catchup TV), Stan, Netflix, YouTube, Spotify, or any streaming service, I lose all DSP including the important Room Correction (in my case) and adjustments I have made to improve audibility of dialogue in video. Unless I use the WDM Driver. But I don't want Windows to remix the audio, so I will want to use Exclusive Mode when I can. (Audio lag and sync have been an issue when using the WDM, but that is now being addressed, I think, with new functionality. I'm still to properly test that.)

So if I don't want Windows to remix audio and I want to have the DSP I currently use, I have to send the audio out from non-MC applications directly to the AVR and use its DSP processing. Which means even for MC I have to use the AVR DSP processing, as I do not want to be switching between DSP in MC and DSP in the AVR when switching between sources on the HTPC. My AVR isn't very good at switching off all DSP quickly, or automatically, particularly Room Correction, which is why I specifically mentioned it earlier.

So basically I have to choose between;
1) All DSP in the AVR and send all output to the AVR directly from all sources (including MC), which gives me the benefit of using Exclusive Mode for those sources that support it, while still suffering Windows Remixing on those that don't.
2) All DSP in MC and send all audio through MC using the WDM Driver, which means that all other sources need to be in Shared Mode and Windows will remix them as it sees fit, because Exclusive Mode crashes.

If the new Keyboard shortcuts for video lipsync adjustment work as expected I would rather go with option 2, and hence the desire to have Exclusive Mode input into the WDM Driver working correctly. After all, much of the reason for using MC is lost if I am doing DSP in the AVR.


Once again, that was verbose, so in short;
+1 for fixing Exclusive Mode input to the WDM Driver. Plus if it is being worked on, any improvement in the lag that occurs, perhaps due to being 64bit, would be appreciated.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

stewart_pk

  • Citizen of the Universe
  • *****
  • Posts: 653
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #11 on: October 27, 2017, 08:23:43 pm »


Unless I use the WDM Driver. But I don't want Windows to remix the audio, so I will want to use Exclusive Mode when I can. (Audio lag and sync have been an issue when using the WDM, but that is now being addressed, I think, with new functionality. I'm still to properly test that.)


If you match the WDM Driver with the input e.g. 24bit-48k for the vast majority of video content based audio does Windows pass it through to MC bit perfect or are there alterations?

Currrently I use the WDM Driver set to 24bit-48k for input from Netflix, Stan, PowerDVD, Web Browser etc. But for Spotify I'm using the WASAPI Loopback feature as I have two soundcards in my HTPC. I have the input soundcard set to 16bit-44k in Windows hoping that this allows bit perfect into MC but once again I'm not sure what happens, thoughts?
Logged

AndrewFG

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3392
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #12 on: October 28, 2017, 01:56:34 am »

If you are using WDM in exclusive mode, and it crashes, then it's not too hard to imagine that the problem is because some other application is trying, and failing, to gain access to the WDM driver at the same time. (??) So I would turn off the other applications, or explicitly set them to output to another sound device..
Logged
Author of Whitebear Digital Media Renderer Analyser - http://www.whitebear.ch/dmra.htm
Author of Whitebear - http://www.whitebear.ch/mediaserver.htm

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #13 on: October 28, 2017, 03:57:23 am »

If you are using WDM in exclusive mode, and it crashes, then it's not too hard the imagine that the problem is because some other application is trying, and failing, to gain access to the WDM driver at the same time. (??) So I would turn off the other applications, or explicitly set them to output to another sound device..

This may work for troubleshooting purposes. Maybe. But for daily operation I do not see how this can be a feasible workaround. Many applications only output to default audio device (Spotify, Chrome...), while others can be set to a specific one (Tidal). If you want to play Spotify, WDM needs to be set as default audio device, and how would you then turn off any other application that uses the same? The same is the case for Netflix played through web browser.

Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #14 on: October 28, 2017, 04:01:25 am »

But for Spotify I'm using the WASAPI Loopback feature as I have two soundcards in my HTPC. I have the input soundcard set to 16bit-44k in Windows hoping that this allows bit perfect into MC but once again I'm not sure what happens, thoughts?
OT comment: Spotify streams lossy, compressed audio, and the term bit perfect is not really meaningful.

Logged

Trumpetguy

  • Citizen of the Universe
  • *****
  • Posts: 974
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #15 on: October 28, 2017, 04:26:51 am »

If you are using WDM in exclusive mode, and it crashes, then it's not too hard the imagine that the problem is because some other application is trying, and failing, to gain access to the WDM driver at the same time. (??) So I would turn off the other applications, or explicitly set them to output to another sound device..

No I'm no expert on how computers work under the hood. But unless other background services/applications are constantly trying to use "their" audio device (by constantly I mean every second or so), I do not see how this can be the cause. In Tidal set to exclusive, blue screen invariably occurs instantly when trying to play certain content (their Masters tracks decoded to 24/96 PCM), but not standard tracks (16/44.1 PCM). I think these are two pieces of (circumstantial) evidence that point out that the problem is not other applications trying to access wdm at the same time, and that the problem is connected to certain types of PCM stream.

Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #16 on: October 28, 2017, 06:23:33 pm »

I'm not sure what happens, thoughts?

The method you are using is the closest we can currently get to avoiding Windows remixing. But it doesn't guarantee Windows won't touch the audio stream, and there is no way to see what Windows is actually doing between a source and the WDM Driver, that I know of. For all we know, Windows may be remixing 24/48 audio to 16/44.1 and then back to 24/48. Exclusive Mode is the only way to know the audio is untouched. Hence my desire to see a solution to this. It would be nice to know it was being thought about.

But the problem may not be in JRiver's control. It may simply be that Windows doesn't allow the Default Audio device to be in Exclusive Mode.

But if the OP is outputting from Kodi to the MC WDM Driver in Exclusive Mode, and the Default Windows Audio Device is not set to the WDM Driver, then Windows isn't the problem.

thank You for your messages, but how to to archieve now the bit perfect delivery to JRiver. Maybe one can use the ASIO Driver of JRiver with an asiobridge driver? https://www.kvraudio.com/product/hifi-cable-and-asio-bridge-by-vb-audio

We don't know. Maybe you could get your ASIO driver solution to work, but how much lag would you suffer, going through multiple drivers?
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #17 on: October 28, 2017, 07:01:18 pm »

I directed MC 22 output  to WDM in 64 bit MC 23 with exclusive mode set. WDM in MC 23 worked fine. Audio Path clearly showed the input bitrate and sample rate as exactly what MC 22 was outputing. I could move from 16/44 to 24/96 to 24/192 and back and forth. My conclusion is that exclusive mode works with WDM in MC23, at least with MC 22 as an input. Unfortunately, when foobar, Kodi and Tidal try to use exclusive mode with WDM in MC23, a BSOD results. Whatever makes MC22 work as a source is not present in foobar, Kodi and Tidal.

Tidal works well in exclusive mode with a wide range of DACs. So, whatever code they use for DACs is not working with WDM.

My tests with MC22 and Tidal were not done with the default device. I selected WDM directly. 

The reports of BSODs for foobar and Kodi are from other posters.
Logged

stewart_pk

  • Citizen of the Universe
  • *****
  • Posts: 653
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #18 on: October 29, 2017, 12:15:38 am »

OT comment: Spotify streams lossy, compressed audio, and the term bit perfect is not really meaningful.

Yes it is, it simply means what Spotify sends doesn't get changed unless we want to and under our control, don't overthink it.
Logged

stewart_pk

  • Citizen of the Universe
  • *****
  • Posts: 653
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #19 on: October 29, 2017, 12:19:30 am »

But the problem may not be in JRiver's control. It may simply be that Windows doesn't allow the Default Audio device to be in Exclusive Mode.

That's not the case, otherwise MC would never work in exclusive mode on systems with only one sound device, which is presumably the majority.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3119
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #20 on: November 10, 2017, 09:05:53 am »

Version .81 should fix this problem.
Logged

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #21 on: November 12, 2017, 04:30:42 am »

Hey,

thank you, but the problem with kodi still exists. Unfortunately sometimes I get a very ugly white noise or something like this, so I have to continue in directsound mode in order to protect my ears and equmipent and will have a look on other convolver software.

Regards
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #22 on: November 12, 2017, 05:20:02 am »

Hey, thank you, but the problem with kodi still exists. Unfortunatley sometimes I get a very ugly white noise or something like this, so I have to continue in directsound mode in order to protect my ears and equpiment and will have a look on other convolver software.
You're still getting blue screens, or you're now getting white noise intermittently?
Those are two very different issues.
Logged

TimoBeil95

  • Junior Woodchuck
  • **
  • Posts: 59
Re: Blue Screen - Kodi (exclusive) + MC WDM
« Reply #23 on: November 12, 2017, 06:42:11 am »

thank you very much,

No bluescreens yet, but I have to do further testing. One time there was this ugly noise, it's not like a white noise, it sounds more like a repeated sample 1000 times a second. Very ugly.

Thank You!

Another question. Is it possible to bring latency to a minimum or even real time, when minimum phase filters are applied? Are there plans to bring FFT partitions to the Convolution engine of JRiver?

Regards
Logged
Pages: [1]   Go Up