INTERACT FORUM

Please login or register.

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

Author Topic: Can't get playback to start using Wasapi on new Surface Pro  (Read 3402 times)

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Can't get playback to start using Wasapi on new Surface Pro
« on: March 23, 2019, 09:39:20 am »

Just bought a new Surface Pro 6 and installed MC25 but can't get playback using Wasapi. Direct sound works but not Wasapi. There is no error message - you press the play button but playback does not begin and the counter stays on zero.

The audio path is not showing any problems.

This is using the Surface Pro's built-in codec which is Realtek High Definition Audio (SST). It only supports 44.1 and 48 but I can't even get playback at these sample rates, not on headphones or speakers. I've reinstalled the driver.

One possible problem area: I imported the settings from another PC (Intel NUC) but they worked fine there and I can't figure out why they don't work here.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #1 on: March 23, 2019, 09:42:37 am »

Make sure something else isn't using WASAPI in exclusive mode.  Explore Control Panel > Sounds.
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #2 on: March 23, 2019, 10:04:41 am »

Many thanks - I don't think that's it because if I open the Sound control panel and try to play the test signal, it tells me it can't because another app is using the driver, but when I close MC, I can then play the test signal. So that tells me MC is taking exclusive control when it is open.


Also, MC25 is the only thing I have loaded onto this new PC apart from the music files themselves, so the only other software on the PC is what comes in the Windows 10 bundle.
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #3 on: March 23, 2019, 11:40:00 am »

In device settings, make sure that bit-depth is set to automatic, and in advanced audio settings, enable the "auto configure output settings" option or set it to "ask".
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #4 on: March 23, 2019, 12:06:28 pm »

Many thanks for those suggestions. I checked those settings and they were OK.

This is turning out to be more difficult than I thought.

I uninstalled MC25 and installed a fresh download of MC25 without any of my own settings - just the trial version - but the Realtek Wasapi driver does not work with that.

I then uninstalled MC25 and downloaded MC24 and tried that. Same result - in both cases the Realtek Wasapi driver does not work (but Windows direct sound does). So it can't be my settings.

I then downloaded Foobar 2000 and tried playback. Foobar offers two outputs, neither of which specifically mentions Wasapi - one is "Primary Sound Driver" and the other is ""Speakers (Realtek High Definition Audio (SST))". Both of these work and I assume the second one is Wasapi.

I'm out of ideas now. Help!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #5 on: March 23, 2019, 02:03:47 pm »

If you're using the 64 bit version of MC, try the 32 bit version.  Or vice versa.
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #6 on: March 23, 2019, 02:42:59 pm »

OK, tried 32 bit version instead of 64 but no difference.

The thing is, other media players (Foobar, Groove Music) work with the Realtek driver but I have no way of knowing for certain that they're actually using Wasapi. Here's what I see:

In MC, the options I am given are:
Default Audio Device (Direct Sound)
Realtek High Definition Audio (SST) (WASAPI)
Realtek High Definition Audio (SST) (Direct Sound)

In Foobar I am given two options:
Primary Sound Driver
Speakers (Realtek High Definition Audio (SST))

In Groove Music, there is only one option:
Speakers (Realtek High Defintion Audio (SST))

All of these work except the one I want - the Wasapi dirver in MC.

What I don't understand is whether Foobar and Groove are using direct sound or Wasapi and I can't think of a way of finding out. In any event, the Wasapi option does not work in MC and MC doesn't like direct sound because the audio path tells me it isn't a direct connection, in spite of its name.
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #7 on: March 23, 2019, 03:15:33 pm »

In fact, I now think ALL the media players are using direct sound. I think this because I have done an experiment, opening the Sound control panel and attempting to play the Test signal while another app is using the Realtek driver.

I believe the Test signal uses Wasapi and therefore the Test signal cannot operate while another app is using Wasapi because the other app will have exclusive access.

Sure enough, if I go into MC and select Wasapi playback, and try to play the Test signal, I get an error message saying I can't do this because another app has exclusive access. But on all other settings, in MC and on the other media players, I am able to play the Test signal while music is playing, and that can only be because the apps are not using Wasapi.

Conclusion: the Surface Pro must be equipped to use Wasapi because the Test signal is using it. But for some reason, no media player, including MC, is capable of using this Wasapi functionality. So I don't think it's an MC fault but even so, can anyone suggest why that might be or suggest a solution? 
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #8 on: March 23, 2019, 04:32:41 pm »

WASAPI can operate in Exclusive or Shared Mode. In MC, Exclusive Mode is set in the "Options > Audio > Audio Device > Device Settings", and is on by default. If you turn that off you will be able to play two audio sources at once.

The only time two applications can play sound at the same time is when all software is using Shared Mode for audio. Direct Sound is always Shared Mode I believe, which is why it works in your tests.

I believe in you testing that MC has been in WASAPI Exclusive Mode, and the Sound Test is trying to play in Shared Mode. So it is MC holding the device in Exclusive Mode that is blocking the test sound.


I have a vague memory that a recent Windows Update broke WASAPI sound for some configurations. (Windows Updates have broken WASAPI on multiple occasions, going by posts on the internet.) Try running Windows Update to see if that finds and fixes anything. Or search the web on the topic.
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

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #9 on: March 23, 2019, 04:45:41 pm »

Yes, RoderickGI, you are right, and so was JimH in post #2 - it seems to be related in some way to exclusive access. I find that if I go into the audio device settings in MC and uncheck the default "Open device for exclusive access", then I can get playback in WASAPI. However, as you say, it's not really satisfactory because I'm then in shared mode, and apart from the possible intrusion of other sounds, and increased latency, it means every time I want to play an audio file with a different sample rate, which is quite often, I have to go into the Sound control panel and manually change the "Sample rate and bit depth when running in shared mode".

I also agree that other audio devices don't have this problem because they are operating in Direct Sound, without exclusive access. So I think the reality is that MC is not in fact competing for access with any other audio device when in WASAPI - it's just a Windows bug that perhaps doesn't affect many people because not many people are using a Realtek codec for playback.

So I will have to do as you suggest and just trawl the web to see if there's a fix. I'll post here if I find one and in the meantime any suggestions welcome.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #10 on: March 23, 2019, 04:51:12 pm »

You can use MC's DSP Studio > Output Settings to resample to something that works.
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #11 on: March 23, 2019, 04:57:43 pm »

Oh yes, thanks JimH, that is very true and a viable workaround, though I would ideally prefer to play back at native sample rate or multiple thereof.
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #12 on: March 24, 2019, 03:12:22 am »

Foobar uses DirectSound unless you install a WASAPI plug-in.
If the automatic settings are not working in Media Center, I would try manually setting the bit-depth for the device settings.
Start with 16-bit. Some devices/drivers have unexpected compatibility and may only work with some of the formats on the list. I've seen devices that will take a 32-bit floating point input but not a 24-bit one for example.

If you go through them all and that doesn't work, try the "disable event style" option and go through the bit-depth settings again - though I would not expect that to be required on recent hardware.

Make sure that exclusive access is enabled. If it is disabled, no audio will play unless you match the device settings in Windows exactly.
The buffer should be set to 10 milliseconds if you are on Windows 10.
Set DSP Studio's Output Format to convert everything to either 2ch 44.1kHz or 2ch 48kHz as well.
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #13 on: March 24, 2019, 06:02:48 am »

That's excellent advice RD James and I very much appreciate it but it turns out that this is definitely a Windows bug and that it's caused by a faulty driver. Below I'm pasting some advice I found online and sure enough, I have the faulty driver referred to, even though this problem dates from October last year while this is a new installation on a new Surface Pro 6. If I delete the driver and reboot, Windows simply reinstalls the same faulty driver so the solution described in the advice below does not work. Googling around, I found a very old driver and I have installed that and it works without any problems at all but it has a very old interface and I would feel happier with a newer version if I can find one. I will have a look later.

1. Type Device Manager in the search box
2. Find and expand Sound, video, and game controllers
3. Look for a Realtek device, or a device that has a yellow triangle with an exclamation point
4. Click on the device to select it
5. From the View menu, choose Devices by connection
6. Look at the parent device -- this will be called something like "Intel SST Audio Controller" (Intel Smart Sound Technology driver version 09.21.00.3755)
7. Right-click the controller device
8. Choose Properties
9. Click on the Driver tab.
10. If the driver version is 9.21.0.3755, you have the driver that was sent to you incorrectly.
11. Click Uninstall Device. You will get a popup asking if you want to remove the driver too, as shown.
12. Check the checkbox, so the driver will be removed.
13. Click Uninstall
14. When the driver is uninstalled, reboot your system.
15. Your audio (speakers and headphones) should now work.
The second option is to install Windows Update KB4468550 which Microsoft rolled out at the weekend. This removes the driver automatically from systems that received it incorrectly.
(EDIT: this did not work for me and anyway, it doesn't tell you which is the new driver you need to replace the defective one.)

Incidentally it's interesting to know that Foobar uses DirectSound unless you install a WASAPI plugin. I bet a lot of people don't know that - I didn't.
Logged

richard-ec2

  • Galactic Citizen
  • ****
  • Posts: 258
Re: Can't get playback to start using Wasapi on new Surface Pro
« Reply #14 on: March 24, 2019, 09:28:46 am »

Well, a little more info and a temporary fix: it seems that it is the Intel driver for the Intel Smart Sound Technology (SST) Audio Controller that is at fault, and the remedy is to go back to the generic Microsoft driver found on many other PCs. This is called the High Definition Audio Controller and has the number 10.0.17763.1. As far as I can see, the only problem with doing this is that you probably lose the Smart Sound Technology functionality, whatever that may be, but at least you can play music properly. Here are the instructions, lifted from the web:

First, you find the Intel SST Audio Controller using the instructions in my previous post. Then:
Right click Intel Smart Sound Technology driver > Choose update driver > Click "Browse..." > Let me pick from a list of drivers > Uncheck "Show compatible hardware" box > Click/Choose "Microsoft "as the Manufacturer > Choose/Select "High Definition Audio Controller" > Click Next > Follow the prompt.
Logged
Pages: [1]   Go Up