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: Resampler always enabled on startup (Read 3636 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Bug: Resampler always enabled on startup

This sample makes you clearly notice if Resampler is on or off (if you have a crappily resampling soundcard)

- DON'T PLAY BACK TOO LOUD, IT CAN DAMAGE YOUR EQUIPMENT DUE TO LOUD HIGH FEQUENCY CONTENT! -

I played it back (resampler -> 48000 Hz enabled by default), disabled Resampler while playing -> weird sound as expected. So far so good.
Now I closed fb2k (with resampler still disabled) and reloaded. This time sound was alright (= Resampler active) again but DSP Manager shows Resampler NOT active. Moving Resampler to Active DSPs made weird sound appear (= Resampler inactive) again.

OS: Win2K SP3, fb2k 0.666 (the same with 0.62... (latest non-beta version before 0.666, don't remember which exactly)).
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Bug: Resampler always enabled on startup

Reply #1
Can you please have a look at DirectSound output status messages in console (eg. used output format) ? They're a more reliable way of checking if resampler is active or not.
Microsoft Windows: We can't script here, this is bat country.

Bug: Resampler always enabled on startup

Reply #2
I don't know what's up. I can't reproduce it anymore, now it's different. If playback is started with resampler disabled and resampler is enabled while playback, The sound changes but is still weird / different from the correct sound that occurs when resampler is active on playback start. Details see below.

Report:

More System details: Via KT133 Chipset, BUS @ 100MHz, AC'97 onboard sound, Realtek Driver; Athlon 1300MHZ, 512MB SDRAM @ 133MHz; Average CPU usage (fb2k not playing) 13%

foobar2000 settings:

Repeat on
Replaygain disabled
Output 16 bit fixed-point
no Dither
no other DSPs active
Resampler settings (if active):
..Target sample rate: 48000 S/s
..
  • Slow mode
    ..Internal precision: 64bit

    1. Output: Direct Sound

    1.1.
    foobar2000 startup with Active DSPs: Resampler (SSRC) -> Start playback. Results:
    Sound: OK
    CPU usage: ~60%
    Console info:
    INFO (foo_output_std) : attempting to create DirectSound buffer : 48000Hz 16bps 2ch fixed-point
    INFO (foo_output_std) : DirectSound initialized successfully, using software mixing

    1.2.
    Deactivate Resampler while playback. Results:
    Sound: weird
    CPU usage: ~20%
    Console info:
    INFO (foo_output_std) : attempting to create DirectSound buffer : 44100Hz 16bps 2ch fixed-point
    INFO (foo_output_std) : DirectSound initialized successfully, using software mixing

    1.3.
    Switch Resampler off/on/off ... Results: The same.

    1.4.
    Stop playback -> Deactivate Resampler -> Start playback. Results:
    Sound: weird
    CPU usage: ~20%
    Console info:
    INFO (foo_output_std) : attempting to create DirectSound buffer : 44100Hz 16bps 2ch fixed-point
    INFO (foo_output_std) : DirectSound initialized successfully, using software mixing

    1.5.
    Activate Resampler while playback. Results:
    Sound: weird but different
    CPU usage: ~60%
    Console info:
    INFO (foo_output_std) : attempting to create DirectSound buffer : 48000Hz 16bps 2ch fixed-point
    INFO (foo_output_std) : DirectSound initialized successfully, using software mixing

    1.6.
    Switch Resampler off/on/off ... Results: The same.

    1.7.
    Close fb2k with Resampler disabled, Startup -> Start Playback. Results the same as 1.4

    1.8.
    Activate Resampler while playback. Results the same as 1.5

    1.9. Same as 1.6

    1.10.
    Stop playback -> Activate Resampler -> Start playback. Results same as 1.1

    1.11. same as 1.2.

    1.12. same as 1.3.


    2. Output: Waveout

    As expected: Resampler on -> Sound OK, Resampler off -> Sound weird without exception.

    So as 1.5. and 1.8. (reproducable) suggest, theres something wrong, but not as bad as it seemed before - sorry about that. If I manage to reproduce the 1st behaviour I'll report.

    Cheers tigre
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Bug: Resampler always enabled on startup

Reply #3
Playing with this sample, I also noticed that if I set the DSP order resampler -> attenuator, things sound ok, but if I set attenuator -> resampler there is obvious distortion. I haven't analyzed in detail what's happening, but I think I shouldn't happen?

Bug: Resampler always enabled on startup

Reply #4
Well, this is simply not making sense. Again, please verify samplerate reported by DirectSound in console to check if resampler is active or not. Or better, see if you can reproduce "resampler being always enabled" problem without foo_dsp_extra.dll installed, heh heh.
Microsoft Windows: We can't script here, this is bat country.

Bug: Resampler always enabled on startup

Reply #5
Quote
Or better, see if you can reproduce "resampler being always enabled" problem without foo_dsp_extra.dll installed, heh heh.



Seriously:
Quote
Again, please verify samplerate reported by DirectSound in console to check if resampler is active or not.

OK. Again in short words what seems wrong to me:
Start playback with resampler disabled, Console shows 44100 Hz sampling rate, sound is weird
-> enable Resampler while playback, Console shows 48000 Hz sampling rate,  sound is weird too

In all other cases (Start playback with Resampler enabled, WaveOut) Resampler Setting, Console output and sound match:
Resampler on = Console output 48000 Hz = Sound OK
Resampler off = Console output 44100 Hz = Sound weird

So resampler setting and Console output always match as expected, but sound not in 1 case.

For me it's not important as I have resampler enabled all the time. If you don't think it's a problem either, just disregard this. I don't want to waste your and my time.
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Bug: Resampler always enabled on startup

Reply #6
I believe that your OS/hardware is playing tricks on you... Perhaps in certain conditions, windows kernel mixer resamples produced sound before sending to soundcard, which would explain what you get.
Foobar2000 DirectSound output logs format specs to console everytime new DirectSound buffer is created ( => everytime playback is started or data format changes), so if it claims that it gets 44100Hz while resampler is set to 48000Hz, there's no way resampler can be touching data.
Microsoft Windows: We can't script here, this is bat country.