Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to force 2 channel output? (Read 3007 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to force 2 channel output?

foobar2000 sounds bad with Nahimic surround sound. It is component that comes with my laptop. It simulates 3D surround sound in headphones. Kind of cross-feed. Please do not ask me to disable it. Sound in headphones is much better when it is enabled, especially when listening music where some instruments are played completely in single channel (left or right).

I tried few players (Windows Media Player, Groove Music, VLC). They play music via Nahimic nice. But when I play it with foobar2000, I hear some reverberation and high frequencies are quiet. I configured VLC to use more than 2 channels in Direct Sound output. After that VLC started to play music the same as foobar2000 plays. Therefore the problem seems to be related to multi channel output.

I tried to use Channel Mixer. I disabled rear channels. Sound became better, but it is still bad.

I tried to use WASAPI shared output. No change.

I tried to use older foobar2000 (1.3.9). No problem there. It looks like forced multi channel output was introduced in recent foobar versions.

Is there way to force foobar open audio device in 2 channel mode?

Re: How to force 2 channel output?

Reply #1
Have you tried adding the built-in DSP "Downmix channels to stereo" to your chain?

Re: How to force 2 channel output?

Reply #2
Yes, I've tried. It doesn't help.
It looks like that foobar upmixes any audio to 4 (or more) channels on final stage before sending audio to audio device.

Re: How to force 2 channel output?

Reply #3
Yes, set your sound device to two channels. WASAPI output always upmixes to however many channels your device indicates it wants.

Re: How to force 2 channel output?

Reply #4
It's already set to stereo in settings. But it's probably set to more channels internally because of 3D surround. And this can't be changed.

Is it difficult to add option to foobar to limit the number of output channels to 2?

Re: How to force 2 channel output?

Reply #5
I'm pretty sure the default output tries to first use the same channel format as the source has and reverts to mixer format only if it fails. The WASAPI shared component that you linked always explicitly uses the mixer format as that is the only guaranteed format that works.

I tested on my machine with HD audio device running on Microsoft's built-in drivers to open a stereo session when the device was configured to 5.1 or 4 speaker modes. The format was unsupported and playback always failed.

You could try adding upmix DSPs to fill all channels with content. But I doubt it helps.

If time was unlimited someone could probably hack those Nahimic drivers to work on developer machine and actually figure out what they do. But this is unlikely.

I suggest you uninstall Nahimic  software and enjoy regular unmutilated audio with standard drivers.

Re: How to force 2 channel output?

Reply #6
What API does foobar2000 use for audio playback?

Re: How to force 2 channel output?

Reply #7
Quote
I'm pretty sure the default output tries to first use the same channel format as the source has and reverts to mixer format only if it fails.
It is how it was in older foobar versions, because sound is good there.

Re: How to force 2 channel output?

Reply #8
I tested on my machine with HD audio device running on Microsoft's built-in drivers to open a stereo session when the device was configured to 5.1 or 4 speaker modes. The format was unsupported and playback always failed.
This sounds odd.  Something I've never thought a problem.  I stay at 7.1 and use 2.0 output just fine.  The attached picture shows this.  Output is for sure two channels; I can see this on my AVR's info screen.

I do force the format (the ff at the upper left, under NVIDIA Digital).  Heh, sure, enough, I unchecked force format and the AVR is showing 7.1 for a 2-channel play.  Well, what do you know.  The second attached pic.
BANNED

Re: How to force 2 channel output?

Reply #9
DirectSound doesn't have this problem.

Re: How to force 2 channel output?

Reply #10
The problem was introduced in the version 1.6.1.

The 1.6 sounds good.
The 1.6.1 sounds bad.

I'll hang with 1.6 for a while :(

Alternatively I can use Dolby Headphone Wrapper. It sounds very good. But I don't want to switch Nahimic surround sound setting every time I switch to other app.

Re: How to force 2 channel output?

Reply #11
When using default (not exclusive) output method and starting playback first time after foobar2000 restart, you can see in console (View->Console) what is actually sent from player to audio device driver.

Re: How to force 2 channel output?

Reply #12
@Rollin, thank you again!

Code: [Select]
Automatic resampling: using Resampler (dBpoweramp/SSRC), Resampler (RetroArch)
Device: Speakers (Realtek(R) Audio)
Mix format: 48000 Hz / 32-bit float / 8 channels (0x63F)
Sending stream: 48000 Hz / 32-bit float / 8 channels (0x63F)

It outputs in 8 channel mode  :'(  :'(  :'(

This needs to be fixed.

Re: How to force 2 channel output?

Reply #13
It's literally the only thing WASAPI supports. The only alternative is either using WaveOut or using DirectSound.

Re: How to force 2 channel output?

Reply #14
Yes, it looks like that. What audio backend was used in v.1.6? Direct Sound?

Re: How to force 2 channel output?

Reply #15
1.6.x series use WASAPI shared by default.
If your computer disagrees with it, I recommend sticking with 1.5.x series - https://www.foobar2000.org/old
1.5.x is considered a 'long term support' release and will get at least one more update with latest bug fixes but no change in features.

There's also waveOut output, not listed but provided for troubleshooting only-
https://www.foobar2000.org/components/view/foo_waveout
It should also help with your foobar2000 1.6.x playback issues.
Microsoft Windows: We can't script here, this is bat country.

Re: How to force 2 channel output?

Reply #16
@Peter, thank you! Waveout output is good.

It would be great if 1.5.x output mechanism was released as external plugin like it was for waveOut mechanism.

Re: How to force 2 channel output?

Reply #17
Anyway, does anybody know why WaveOut is legacy? What's wrong with it? All I know is that it doesn't support floating point output.


Re: How to force 2 channel output?

Reply #19
I think there is a plugin called openal output?

Re: How to force 2 channel output?

Reply #20
Hello,
Sorry for the late reply, I have just now tumbled into this topic and I have the same problem as OP.

I am using a Logitech G Pro X and have recently switched back to Logitech's drivers because they seem to have fixed the problems regarding their surround sound in their G Hub application. Logitech's drivers recognise my headphones as a 7.1 device and no matter how many speakers of those I disable in the windows configuration page foobar2000 with it's WASAPI shared output will always output to 8 channels. I know, that Logitech applies the surround downmixing in the pre-mix line, because Equalizer APO only works with surround if this setting is unchecked in the configurator.
With Microsoft's generic drivers the headphone is recognised as a stereo device and Foobar2000 outputs 2 channels correctly. The problem with this is that many games use the Windows settings (just like foobar2000 here) to output audio and they often don't have manual audio output settings so the only way to use the DTS surround to stereo downmixing is to use the Logitech drivers. This sometimes sounds much better than than basic stereo output in games (many games don't have proper 3D positional audio) so I would like to keep using these drivers and it's features like the microphone presets.

I have tested foobar2000 version 1.6 vs 1.6.1, and surely in 1.6 even with the new WASAPI output it still doesn't use the Windows 7.1 configuration and outputs stereo so the audio was good there for this use case. I have checked the 1.6.1 changelog and it writes:
"Decoders are now made aware of output sample rate (from Windows Mixer settings) and can decode certain formats directly to the intended sample rate, skipping potential resampling steps."
Could it be that version 1.6.1 using the Windows Mixer settings directly sets the output channels to in this case undesirable amount?
Is there no way to override this and force 2 channel output in WASAPI shared mode?
I suspect that 1.6 version doesn't take this setting from Windows Mixer and that is why stereo sound works there even with virtual surround configurations.  Can't we only take the sample rate but not the number of channels from Windows Mixer?

I have found a topic that compares the sound between these two versions and I might be speculating but it could be connected to this exact problem discussed here:
https://hydrogenaud.io/index.php?topic=119964.0
I believe this because I feel like a lots of people are using gaming headsets with 5.1/7.1 virtual surround solutions and they usually work by being recognised as surround speakers in windows.

If I disable the surround mode in the Logitech G Hub application, then foobar2000 starts outputting in stereo again even though windows still recognises the headphones as 7.1 device. Doing this every time when I want to listen to music is a bit tedious (I might be just lazy) but I cannot use this when I simultaneously want to play a game with surround and listen to music in stereo.
One solution is to use the WaveOut plugin as has been posted above, but after reading the comparison with DirectSound it seems like an inferior choice even compared to the old default output of Foobar2000 so I have reverted back to version 1.5.9 where with DirectSound this problem does not occur even with surround mode turned on, foobar outputs as many channels as the source file and Logitech's DTS only downmixes on-demand which is the correct way in this use case.
Now this solution works perfectly fine, but looking at the future, there might be a time this 1.5.x version will not be supported any longer and when that happens it would be very nice if we could have DirectSound output as a plugin or somehow force/override output channels to the desireable amount as it works in version 1.6.
Sorry for the long post, I hope I provided some more information on this issue.