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.
Recent Posts
1
3rd Party Plugins - (fb2k) / Re: foo_midi (foobar2000 v2.0)
Last post by ha7pro -
There are no Chinese characters in the path
At this point I have to consider using printf debugging. Would you be willing to install a private version that contains a lot of debugging statements?

No problem, but I don't have any testing experience.
Attached is a comparison video,
about adding midi to the playlist,
the differences between different versions,
maybe provide some help?
5
3rd Party Plugins - (fb2k) / Re: foo_midi (foobar2000 v2.0)
Last post by pqyt -
Quote
I really have no clue what's going on. The file plays correctly on my x86 setup. Even if there was an error during processing an exception would have been thrown with the error message.
A lot has changed in the SoundFont handling. Which SoundFont are you using? Which player do you have selected?
The error message is also short.
From v2.16.1.0-alpha1 to the latest beta,
That's the problem: there is no error message.
The soundfont file I use is: filename: Timbres of Heaven (XGM) 4.00(G).sf2
That's fine. But is it in a path containing Chinese characters?
7
Wiki Discussion / Re: Playback Buffer, Hardware Buffer, Read-Ahead, Full File Buffering
Last post by Cormy1 -
Random stutters assuming your playback buffer settings aren't too low can be caused by a variety of problems such as misbehaving devices and poorly configured system settings.  If a system is quite old, it can also be sign that you need an upgrade or newer computer.  Laptops age faster than desktops do.

I swap the laptop's hard drive for a solid state drive as well as that might improve system performance a lot and an SSD is just better for a laptop overall as they have no moving parts and will consume less power.
You need to stop focusing on laptop aging and SSDs.
The system that is suffering from stutters is a desktop on a Ryzen processor, running Windows 10 installed on an SSD with a new 4TB CMR drive capable of >200MB/s that isn't set to ever go inactive. The last time I ran CrystalDisk on it, the highest latency result it had was in milliseconds. That's the system that has stutters.
All the stuff about my laptop wasn't about stuttering, it was just to figure out how the buffers work, which is what the topic is about.

Until foobar adds some kind of logging/debugging mode, pointing our fingers at random aspects of my rig is going to be a waste of time. It is PROBABLY a software issue. What software? No idea. No I'm not going to reset/update my BIOS, reset/reinstall Windows, and then potentially install or try rolling back drivers to find out.


You need buffers because your multitasking operating system is always multitasking and interrupting, even when you're only running one application.    The size buffer you need depends on what the operating system is doing, what background process are running, what any other applications are doing, and how powerful your processor is.

Oh...   Of course "higher-resolution" audio has to process more data so that generally requires bigger buffers too.
I'm well aware of why I need buffer and how the buffer size I need is variable.
However, Foobar comes with a default buffer of 1 full second. That is A LOT for any system. Hell I've dealt with audio production on low-latency WASAPI with VSTs and plugin-chains without stuttering.

The buffering settings are pretty self explanatory and you seemed to understand them well.
I THINK I understand them, but their explanations should really be in the wiki.
The hardware buffer setting you wondered about only affects exclusive WASAPI output.
I believe WASAPI output is now the default of foobar. The 1.6 release notes say that WASAPI shared is the default.
I will continue to say that it can affect gapless playback. But whether it does depends on how long playback buffer you have and how fast the next track can be fully loaded. If you don't have enough playback data buffered for the duration it takes to fully load next track into memory and start decoding new data from it, you will have a gap.
But playback begins "instantly" when you just start playing any track. Even if you weren't dealing with a gapless playback album, wouldn't it impact an individual file's starting time? Or does it only populate with the next file in the queue?
In Windows power settings I currently have my hard drives set to sleep after 6 minutes.
As you were told, this sounds like a bad idea. Powering on and off isn't good for the health of spinning hard drive.
Perhaps, but I've gotten my 25k hours out of it and that's not the system giving my trouble as I've elaborated on above.

You will never get two songs buffered in advance by default in foobar2000 unless they are shorter than the 30 second output buffer. Only track that is being decoded or about to be decoded is affected by any buffering settings.

You should never hear a glitch with default settings. If you do, you should check DPC latencies. There can be many causes of unwanted delays that ruin realtime playback, some power saving settings combined with bad drivers can make things worse. You can also try disabling Windows dynamic tick.
Feature request: Buffer >30 seconds wen? Also ideally some logging/debugging mode.
See that's what I'm thinking too, under normal circumstances I REALLY shouldn't ever hear any hiccups with default settings, but I do.
I also REALLY shouldn't be needing to touch system timer settings to fix it.
While "idling" LatencyMon is all green. This is with Excel, Explorer, Firefox with a few tabs including this one and Discord, Steam and Foobar open. I let it run for 9 minutes and everything stayed under 1 millisecond latency and said I was good for real-time audio.
When booting the game I'm usually playing when I hear a stutter, it registered a maximum of 1.2ms from the Nvidia kernel driver.
It says that's not okay for real-time audio but uh... I'm not doing real-time audio at the moment. or I shouldn't be. Played a few matches, still didn't go much above 1.2ms and didn't get any stutters.
Maybe I'll try to get a stutter on the monitor. Nothing in ~3 hours this time.
8
3rd Party Plugins - (fb2k) / Re: foo_midi (foobar2000 v2.0)
Last post by ha7pro -
foo_midi\Infrastructure\InputDecoder.cpp

/// <summary>
/// Adds the specified tag.
/// </summary>
void InputDecoder::AddTag(file_info & fileInfo, const char * name, const char * value, t_size maxLength)
{
    if ((name == nullptr) || (value == nullptr))
        return;

    if (value[0] == '\0')
        return;

    pfc::string Value;

    if ((maxLength != 0) && value[maxLength - 1])
    {
        Value.set_string(value, maxLength);
        value = Value;
    }
    else
        maxLength = ::strlen(value);

    if (!pfc::is_lower_ascii(value) && !pfc::is_valid_utf8(value, maxLength))
    {
        if (IsShiftJIS(value, maxLength))
        {
            Value = pfc::stringcvt::string_utf8_from_codepage(932, value);
        }
        else
        if (IsEUCJP(value, maxLength))
        {
            Value = pfc::stringcvt::string_utf8_from_codepage(20932, value);

            // Try other code pages.
            if (Value.is_empty())
                Value = pfc::stringcvt::string_utf8_from_codepage(51932, value); // EUC Japanese
        }
        else
            Value = pfc::stringcvt::string_utf8_from_ansi(value);

        if (!Value.is_empty())
            value = Value;
    }

    fileInfo.meta_add(name, value);
}

maybe...

if (!pfc::is_lower_ascii(value) && !pfc::is_valid_utf8(value, maxLength))
{
    bool converted = false;

    if (IsShiftJIS(value, maxLength))
    {
        Value = pfc::stringcvt::string_utf8_from_codepage(932, value);
        converted = !Value.is_empty();
    }

    if (!converted && IsEUCJP(value, maxLength))
    {
        Value = pfc::stringcvt::string_utf8_from_codepage(20932, value);
        if (Value.is_empty())
        {
            Value = pfc::stringcvt::string_utf8_from_codepage(51932, value); // EUC-JP
        }
        converted = !Value.is_empty();
    }

    if (!converted)
    {
        Value = pfc::stringcvt::string_utf8_from_ansi(value);
    }

    if (!Value.is_empty())
    {
        value = Value.c_str();
    }
}

ChatGPT's suggestions

9
3rd Party Plugins - (fb2k) / Re: foo_midi (foobar2000 v2.0)
Last post by ha7pro -
Quote
I really have no clue what's going on. The file plays correctly on my x86 setup. Even if there was an error during processing an exception would have been thrown with the error message.
A lot has changed in the SoundFont handling. Which SoundFont are you using? Which player do you have selected?
The problem started with v2.16.1.0-alpha1.
I usually like to use BASSMIDI.
When not using soundfont,
I will choose LibADLMIDI.
I have tried other players.
No matter which one I choose,
the same error will be reported.
When resetting the foo_midi tab,
the same error will be reported.
The error message is also short.
From v2.16.1.0-alpha1 to the latest beta,
I have tried every beta,
and the problem has always existed.
The soundfont file I use is:
filename: Timbres of Heaven (XGM) 4.00(G).sf2
sha1: 099c2c3ebb707e59489be652c2791a5449483c21
By the way,
I have the same problem with the X64 version.
10
General - (fb2k) / Re: Free Encoder Pack
Last post by 4codec2 -
Both Maikmerten and Case put a lot of work into polishing Helix, and if you dig up past listening tests on this forum Helix fares anywhere from competitive to superior against LAME while reducing encode times substantially.  If Peter is willing, I'd welcome a new preset, and inclusion into the Free Encoder Pack.

On a secondary note; fb2k has presets for Tak, Monkey's, and Exhale yet they are not included. Unless there is licensing that would restrict it then I think those encoders should be included too. Replacing the included non-aoTuV version of oggenc2 with the version that has aoTuV  but without lancer opts would be an improvement in my eyes as well, but I'll let the developers/community weigh in on that one.

I'm considering creating a thread with some ideas I've had on streamlining the interface for fb2k's converter dialog, specifically regarding the usage of custom presets. These ideas would not hurt advanced users, and would simplify usage for people transitioning from more casual to advanced usage.

Lasly great call on finally including 64-bit binaries!