INTERACT FORUM

Please login or register.

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

Author Topic: Feature request - Audio output to current Windows system settings?  (Read 894 times)

MarcVRML

  • Recent member
  • *
  • Posts: 32

Hi - I use Media Center on a Windows 10 platform which I often have to switch audio modes in for various reasons. I've set MC up to convert audio to 48khz, 7.1 Channels with JRSS mixing which delivers excellent results when I set Windows audio to Dolby Atmos.

However, when I switch Windows to Stereo or 5.1, MC will sometimes crash, and sometimes report it can't play the file because the output settings don't match the systemwide settings.

Is there a way to set automatic adaptation for each Windows System audio mode, so that no matter which mode I set my PC in, MC is able to accommodate it?

(I'm hoping this isn't a big ask, as it's the way browsers work when watching, say, streaming video out of Youtube - a few moments of silence and they adjust to the new environment without any problems).

FYI I'm using MC29.0.91 and would be happy to upgrade to MC32 IF it can be confirmed that MC32 supports this.

Thanks,

Marc

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71827
  • Where did I put my teeth?
Re: Feature request - Audio output to current Windows system settings?
« Reply #1 on: April 23, 2024, 07:14:53 am »

I don't recognize that as an MC problem, but give MC32 a try.
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #2 on: April 23, 2024, 08:35:25 am »

Hi, I've just updated to MC32 and have repeated the test.

All plays fine in my Dolby Atmos setting, but when I switch to Stereo, it reports that my chosen CODEC (WASAPI) does not suport the desired output format (48KHz 8ch), and recommends 48Khz 2ch.

This would be fine, except that if I then switch back to Atmos, I have to manually change the output back to 8ch.

What I'm asking for is a way for Media Center to "discover" that the current system audio does not support the desired output format, and to use the best settings it can to make things work without me having to manually make changes. That way, whatever audio setting I choose on my PC (be it stereo, 5.1, 7.1, or Atmos), Media Centre would continue playing the audio tracks to fit the PC's settings.

There is no "system setting" in the output control dialog, and so it's a manual process to make these changes when I shift audio modes on my PC.

Best,

Marc
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71827
  • Where did I put my teeth?
Re: Feature request - Audio output to current Windows system settings?
« Reply #3 on: April 23, 2024, 08:39:47 am »

You can use Zones and Zoneswitch.  Wiki.
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #4 on: April 23, 2024, 08:49:34 am »

Looking at the docs, it states that I can split my destination outputs into zones and use zone switching to send differently formatted output to different speakers, assuming I've understood correctly.

However, that isn't what I want. I want the output to adapt to the number of channels my PC states is available to it.

If I've misunderstood, then I'd be grateful for more detailed guidance. Thanks.
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #5 on: April 23, 2024, 06:39:48 pm »

After some more tinkering, the only way I can get things to work is to switch away from WASAPI and revert to DirectSound. I'm guessing therefore that this disconnect/reconnect behaviour is something handled at the driver level. It would be helpful however if there was a "match target output" in the same way that there's a "match source input" when it comes to the number of channels.

For now, I'm going to stick with the nVidia High Definition Audio (DirectSound) option on the device list, and see how it goes. Thanks for the responses on this.
Logged

arcspin

  • Galactic Citizen
  • ****
  • Posts: 391
Re: Feature request - Audio output to current Windows system settings?
« Reply #6 on: April 23, 2024, 10:05:09 pm »

This looks somewhat similar to my request I made i september 2022.

https://yabb.jriver.com/interact/index.php/topic,133924.msg927704.html#msg927704
Logged
Hardware: Intel Core i5-8600K 16GB RAM, ASUS GeForce RTX 2080 8GB DUAL OC
Software: Windows 10 Home 64-bit, version 2004, JRiver MC 29, MadVr 0.92.17 (Beta 113), NVIDIA driver 457.09
Projector: JVC DLA-I X5500 (RS420, X570R) -
Screen: DNP Supernova 08-85
Processor: Anthem AVM 70
Power amp: XTZ A2-400 for Front & Center - XTZ A2-300 for Surround & Height channels
Speakers: Arendal 1723 S Monitor for Front & Center, Linn Unik for Front Height, Rear Height, Surround & Surround back. Elipson Planet M for Top Middle.
Sub: Arendal 1723 1S

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #7 on: April 24, 2024, 03:32:03 am »

Hi Arcspin - yes, very similar. The problem stems from my choice to use WASAPI, which on my system at least is very picky about the format it requires (48KHz 8ch - it doesn't want to play with anything other than that). Switching back to DirectSound (I'm using my GPU's HDMI output to my external AV amp, so am making use of nVidia's high definition audio driver mode) does remove the problem, although I worry I'm somehow reducing my overall audio quality as a result.

To my ears, so far at least, I haven't been able to hear any drop in quality, and I DO know that DirectSound is capable of bit perfect reproduction, despite having a higher latency.

I'm not worried about the latency, as things still seem highly responsive, and so fingers crossed this will be a valid workaround but I thought it worth mentioning that there's nothing in Media Center that allows for overrides to accommodate changes in a system which changes its channel setups and still uses WASAPI.
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7507
  • When Summer comes...
Re: Feature request - Audio output to current Windows system settings?
« Reply #8 on: April 24, 2024, 03:57:39 am »

The thing you should know about DirectSound if you care about bit-perfect audio output is that DirectSound goes through the system mixer and the output isn't bit-perfect, whereas WASAPI Exclusive bypasses the system mixer and is bit-perfect. But if you're using any sort of DSP like volume leveling it already isn't bit-perfect so it may not matter to you.

When you use WASAPI, I assume you have exclusive access enabled (MC's Options > Audio > Audio Device > Device settings > Open device for exclusive access)? If so, what happens if you disable exclusive access for it, does it work then? Yes, when you uncheck exclusive access WASAPI becomes WASAPI Shared and goes through the system mixer so it'd be like DirectSound but I'd be a little interested if disabling exclusive access and having it go through the system mixer also allows it to work.

Using Zones and ZoneSwitch as a workaround like Jim mentioned is viable, but it'd require setting it up and making the rules apply to whatever format(s) cause issue. You may be able to workaround it via DSP Studio > Output Format too using channels, which when using Zones and ZoneSwitch could be another workaround.
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2024 Update (24H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2024 Update (24H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #9 on: April 24, 2024, 04:36:52 am »

Thanks for that info - I'm not using volume levelling, but I am using JRSS upmixing to 7.1 from a 2 channel source for music, and so that could be why I don't notice any difference. Thanks also for your feedback on the use of Zoning - I still don't understand how to implement that, so if anyone could provide an idiot's guide for me I'd be happy to try that.

As for the exclusive mode access, I've tried on and off and get the same results with frequent crashes following changes to the audio channel number. FYI audio device resets can also cause the problem, with me switching my AV amp to TV mode, instead of receiving audio from the PC, after a while this sometimes causes the PC to think the AV amp is no longer connected and it turns audio off. When I switch back, audio gets turned back on again. it's then pot-luck as to whether or not playback through Media Center will work. Sometimes it'll crash and I have to restart it.

Having MC automatically adapt to the possibility of the audio device being removed / reset / reconfigured seems to me to be the best solution.
Logged

craigmcg

  • World Citizen
  • ***
  • Posts: 203
Re: Feature request - Audio output to current Windows system settings?
« Reply #10 on: April 24, 2024, 05:49:56 am »

This may be a silly question but why are you making frequent changes in Windows sound settings?

I ask because I've been using a set and forget concept for some years without issues. I make the desired settings change on the Tools - Options - Audio - DSP and Output format screen to match the number of speaker channels that I have (5.1 in my case) using either WASAPI Exclusive with my former sound card or ASIO using my current multi-channel DAC.

Everything plays fine for me so I'm wondering if it might for you too if you tried this model instead of changing Windows sound settings.
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #11 on: April 24, 2024, 06:31:08 am »

I wish I didn't need to make those changes - when I use some conferencing software, for example, having Atmos or multichannel enabled creates an echo for other recipients whose voices I hear through my setup. Switching to stereo eliminates that problem.

There's also the issue of the sound device apparently disconnecting when I switch to a different input on my AV amplifier, which is the equivalent of changing channel numbers from 8 to 0, and - when I return - back again, which also upsets MC under WASAPI, but not under DirectSound.

Logged

craigmcg

  • World Citizen
  • ***
  • Posts: 203
Re: Feature request - Audio output to current Windows system settings?
« Reply #12 on: April 24, 2024, 05:35:08 pm »

Thanks for the explanation. I have only used Slack or Teams for conferencing etc and they each let me specify the audio device so that it is possible for me to use different audio devices in different applications (eg. I used my Poly bluetooth headset for my former company's Genesys Cloud phone system with my laptop mike/speakers being used for Teams so that I could use both simultaneously without echo). On one of my home pcs, I use the pc's speakers for listening from browsers etc and my Sennheiser headphones with MC32 (not simultaneous but no settings issues). I'm mentioning this in case you could make tweaks to your processes that could resolve the issues if there is not an easier way currently available to you. Good luck with the workarounds/solution!
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #13 on: April 24, 2024, 05:37:45 pm »

Thanks Craigmcg, sounds like you've got it all sorted! Much appreciated for the extra info - I'll certainly look into it.

Best,

Marc
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #14 on: April 24, 2024, 06:09:40 pm »

Well, I spoke too soon. Despite being on DirectSound and it being somewhat more resilient, I just encountered a crash situation in MC32 after playing a Youtube video through Chrome, stopping and closing that video, and then returning to play music in MC32. It appeared to freeze, played a few fragments, then crashed.

I just think the software is highly finicky when it comes to the expected audio device being unavailable or in the process of resetting.

MC32 devs ... what can I do to help you debug this? Is there a logging system I can turn on and then send the outputs to you?
Logged

hvac

  • Recent member
  • *
  • Posts: 33
Re: Feature request - Audio output to current Windows system settings?
« Reply #15 on: June 06, 2024, 10:34:02 am »

The thing you should know about DirectSound if you care about bit-perfect audio output is that DirectSound goes through the system mixer and the output isn't bit-perfect, whereas WASAPI Exclusive bypasses the system mixer and is bit-perfect. But if you're using any sort of DSP like volume leveling it already isn't bit-perfect so it may not matter to you.

When you use WASAPI, I assume you have exclusive access enabled (MC's Options > Audio > Audio Device > Device settings > Open device for exclusive access)? If so, what happens if you disable exclusive access for it, does it work then? Yes, when you uncheck exclusive access WASAPI becomes WASAPI Shared and goes through the system mixer so it'd be like DirectSound but I'd be a little interested if disabling exclusive access and having it go through the system mixer also allows it to work.

Using Zones and ZoneSwitch as a workaround like Jim mentioned is viable, but it'd require setting it up and making the rules apply to whatever format(s) cause issue. You may be able to workaround it via DSP Studio > Output Format too using channels, which when using Zones and ZoneSwitch could be another workaround.

DSP isnít bit perfect. I would like to know if there are other DSP parameters that arenít bit perfect. Thanks, sorry for being off topic but Iím gobsmacked.
Logged

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #16 on: June 06, 2024, 10:53:49 am »

Thanks hvac.

Yes, I've tried it both ways (enabling and disabling exclusive access), but the same problem persists, in that MC just doesn't seem to behave well with a "busy" windows environment which chops and changes its audio outputs. It also sometimes struggles after Chrome plays a video on youtube, if I've got MC on pause part way through playback. I usually have to click "stop" on MC and then play the track from the beginning.
I also see a problem when waking up from hibernation and attempting to resume a part-played track.

My guess is that this is something at the system level which is denying/disconnecting the audio connection but MC isn't equipped to handle it. Typically, I'd expect an app to detect the audio environment had changed and just reconfigure itself around it.

Note that this behaviour happens with both Wasapi and DSound, although Wasapi is finicky about the conversion-requirements (all sources need to be converted to 48KHz), whereas DSound isn't so fussy but still crashes in the aforementioned circumstances.

I hope this makes sense.

Best,

Marc
Logged

Awesome Donkey

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 7507
  • When Summer comes...
Re: Feature request - Audio output to current Windows system settings?
« Reply #17 on: June 06, 2024, 11:06:27 am »

DSP isnít bit perfect. I would like to know if there are other DSP parameters that arenít bit perfect. Thanks, sorry for being off topic but Iím gobsmacked.

All of them. Using any DSP at all makes the output no longer bit-perfect, which is to be expected because in one way or another you're altering the final output. If you use anything like Output Format to dither/resample, using volume leveling and peak level normalization, equalization, etc. the output won't be bit-perfect anymore.

If you care about bit-perfect audio you shouldn't use any DSP whatsoever and you should use WASAPI exclusive or ASIO.
Logged
I don't work for JRiver... I help keep the forums safe from Viagra and other sources of sketchy pharmaceuticals.

Windows 11 2024 Update (24H2) 64-bit + Ubuntu 24.04 LTS Noble Numbat 64-bit | Windows 11 2024 Update (24H2) 64-bit (Intel N305 Fanless NUC 16GB RAM/500GB M.2 NVMe SSD)
JRiver Media Center 32 (Windows + Linux) | iFi ZEN DAC 3 | JBL 306P MkII Studio Monitors | Audio-Technica ATH-M50x Headphones

MarcVRML

  • Recent member
  • *
  • Posts: 32
Re: Feature request - Audio output to current Windows system settings?
« Reply #18 on: June 06, 2024, 11:14:00 am »

Thanks Awesome Donkey - Bit perfect isn't my goal. A stable playback system is, which does not crash following wake from hibernation, or a system change to audio devices.
Logged
Pages: [1]   Go Up