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: [BUG?] Foobar fails to function with Windows Sonic, why? (Read 4108 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[BUG?] Foobar fails to function with Windows Sonic, why?

Hello!

I've been trying to get foobar to work with Windows Sonic for headphones. But it doesn't work. As to my knowledge Sonic only activates with multi channel audio, for some reason. So I tried:
  • Using the DSP within foobar to upmix to 7.1, but the output sounds identical.
  • Converting a music file to 7.1, where the channels become left/right, and the others are silent. Now the output volume is abnormally low (which might be a bug in itself), but if I turn up the volume it sounds the same
So I can only conclude that something's wrong on Foobar's side, which breaks Sonic from functioning.
With my mediaplayer, if I set output to 7.1 Sonic activates all the time, regardless of the input file.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #1
I see no rational reason for foobar to work like this.
I just tried a vanilla portable instance, and it does the same thing. Multi channel just becomes really low volume compared to stereo.

Not sure how I could test to be sure, but it seems like foobar just statically decreases volume for the channels for multi-channel files and down-mixes and outputs them as stereo.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #2
Not sure how I could test to be sure, but it seems like foobar just statically decreases volume for the channels for multi-channel files and down-mixes and outputs them as stereo.

That's Windows that does that by default unless a driver maker for an onboard or dedicated sound card specifies otherwise with their effects.  Maybe Windows Sonic requires something other than WASAPI shared mode?  Have you tried an older version that uses Direct Sound?

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #3
From what I can see spatial audio support requires using specific API for it: https://docs.microsoft.com/en-us/windows/win32/coreaudio/spatial-sound.

foobar2000 doesn't decrease volume. It just plays the audio in the format that Windows mixer wants, so only front left and front right channels contain audio and the others are empty. It's your virtual surround system that mixes the signal back to stereo and makes it quiet in the process.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #4

That's Windows that does that by default unless a driver maker for an onboard or dedicated sound card specifies otherwise with their effects.  Maybe Windows Sonic requires something other than WASAPI shared mode?  Have you tried an older version that uses Direct Sound?
Which is the last version that supports directsound? (It would be strange though because Sonic appeared in 10, where directsound is only a legacy)

From what I can see spatial audio support requires using specific API for it: https://docs.microsoft.com/en-us/windows/win32/coreaudio/spatial-sound.

foobar2000 doesn't decrease volume. It just plays the audio in the format that Windows mixer wants, so only front left and front right channels contain audio and the others are empty. It's your virtual surround system that mixes the signal back to stereo and makes it quiet in the process.
The full flair thing I guess, audio with positional info. Speaker virtualization apparently happens automatically.

foobar2000 doesn't decrease volume. It just plays the audio in the format that Windows mixer wants, so only front left and front right channels contain audio and the others are empty. It's your virtual surround system that mixes the signal back to stereo and makes it quiet in the process.
Things don't add up.
If I play audio with something simple like MPV with vanilla setting stereo plays unprocessed, the same audio with added silent channels plays with virtualization becoming active. If I force 7.1 output. The two files sound identical with virtualization.

With foobar the only difference when playing the 7.1 file, the only difference is that it's a lot more silent.
I can't find a setting to force 7.1 in foobar. When I set the upmix to 7.1 DSP audibly nothing changes whatsoever.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #5
Not sure how I could test to be sure, but it seems like foobar just statically decreases volume for the channels for multi-channel files and down-mixes and outputs them as stereo.

That's Windows that does that by default unless a driver maker for an onboard or dedicated sound card specifies otherwise with their effects.  Maybe Windows Sonic requires something other than WASAPI shared mode?  Have you tried an older version that uses Direct Sound?
Looking at it more closely mpv also uses WASAPI and it works fine:
Code: [Select]
[ao] Trying audio driver 'wasapi'
[ao/wasapi] requested format: 44100 Hz, 7.1 channels, s16
[ao/wasapi] No device specified. Selecting default.
[ao/wasapi] Selecting device '{24c7155c-eb9e-482d-9bea-4b6fa51c2a3f}' (Hangszórók (Realtek(R) Audio))
[ao/wasapi] Monitoring changes in device {0.0.0.00000000}.{24c7155c-eb9e-482d-9bea-4b6fa51c2a3f}
[ao/wasapi] Trying 7.1 float (32/32 bits) @ 48000hz (shared) -> ok
[ao/wasapi] Accepted as 7.1 float @ 48000hz -> 7.1 float (32/32 bits) @ 48000hz (shared)
[ao/wasapi] Device period: 10 ms
[ao/wasapi] Buffer frame count: 2400 (50 ms)
[ao/wasapi] IAudioClock::GetFrequency gave a frequency of 1536000.
[ao/wasapi] device buffer: 2400 samples.
[ao/wasapi] using soft-buffer of 9600 samples.
AO: [wasapi] 48000Hz 7.1 8ch float
[cplayer] AO: Description: Windows WASAPI audio output (event mode)

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #6
Which is the last version that supports directsound? (It would be strange though because Sonic appeared in 10, where directsound is only a legacy)

Any version of foobar2000 before 1.6 series uses DS: https://www.foobar2000.org/old

Give those a shot to see if this fixes your problem?  If so, a try looking for DS plugin for more recent versions.  If not, than someone needs to code a specific output plugin to use Windows Sonic as @CASE said.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #7
Which is the last version that supports directsound? (It would be strange though because Sonic appeared in 10, where directsound is only a legacy)

Any version of foobar2000 before 1.6 series uses DS: https://www.foobar2000.org/old

Give those a shot to see if this fixes your problem?  If so, a try looking for DS plugin for more recent versions.  If not, than someone needs to code a specific output plugin to use Windows Sonic as @CASE said.

No difference. However it seems abnormal, I used to have more options with old foobar versions.
Also, with mpv explicitly using Wasapi, it shouldn't be a problem.

X

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #8
No difference. However it seems abnormal, I used to have more options with old foobar versions.
Also, with mpv explicitly using Wasapi, it shouldn't be a problem.

All that's needed here is an output plugin that implements support for the API be it officially by foobar2000 itself or a 3rd party one.

foobar2000 removed DirectSound support when support for Windows XP was dropped in 1.6, so I now know old games probably won't work with it (nice one Microsoft).

It's not a bug, it's just not supported at the present is my conclusion and it looks like it has to be explicitly supported at the application level as well to work.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #9
No difference. However it seems abnormal, I used to have more options with old foobar versions.
Also, with mpv explicitly using Wasapi, it shouldn't be a problem.

All that's needed here is an output plugin that implements support for the API be it officially by foobar2000 itself or a 3rd party one.

foobar2000 removed DirectSound support when support for Windows XP was dropped in 1.6, so I now know old games probably won't work with it (nice one Microsoft).

It's not a bug, it's just not supported at the present is my conclusion and it looks like it has to be explicitly supported at the application level as well to work.
Sorry, but I don't understand why are you saying that.
It seems clear that the problem is not directsound related since mpv explicitly uses wasapi.
Also it seems certain that nothing special is implemented with the various apps that this works with.
The most basic player I can think of is Total Commander's lister, which can play wav files, but not much else.  And if I play the 7.1 file with it, it plays correctly with virtualization. Apparently either something odd happens on foobar's side the confuses the Win10 audio layer, or an outright bug.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #10
With foobar the only difference when playing the 7.1 file, the only difference is that it's a lot more silent.

I get the same feelings. If I play an multichannel file (6 ch or so) it appears slightly quieter than if it is when played with DSP enabled downmixed to stereo  or converted to stereo with downmixed to stereo option enabled. Not sure if it is intended behavior or not.
Somewhere, there's someone dying in a foreign land
Meanwhile, the world is crying stupidity of man
Tell me why, tell me why

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #11
Hi,

As Foobar2000 sends a stereo or multichannel PCM encoded stream to Windows Sonics, and Sonics reacts when receiving a Dolby Atmos ( or DTS X ) encoded bitstream,  the reported no-action is the correct action.

Krgds

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #12
Hi,

As Foobar2000 sends a stereo or multichannel PCM encoded stream to Windows Sonics, and Sonics reacts when receiving a Dolby Atmos ( or DTS X ) encoded bitstream,  the reported no-action is the correct action.

Krgds
That is not true. It reacts to multi-channel audio. Also, I'm quite sure it can't accept or decode Atmos or DTS-X.

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #13
Well, I had problems finding good information for Windows Sonic on the Internet, but I found a video on Youtube, "How to use Windows Sonic in VLC Media Player" by Shan Ahmed. In this video I see he selects "Stereo audio output mode" = "Dolby Surround" and "Speaker Configuration" = "5.1".

Krgds

Re: [BUG?] Foobar fails to function with Windows Sonic, why?

Reply #14
Have looked around the Internet for information on Windows Sonic. For playing audio files using Microsoft Spatial Audio you need a player supporting the API, and today only one is found:  WWSpatialAudioPlayer plays sound using Spatial sound API. This player is a simple and working player, https://sourceforge.net/p/playpcmwin/wiki/WWSpatialAudioPlayer.

Krgds