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: Is there any explanation of the pfc lib? (Read 3880 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is there any explanation of the pfc lib?

It takes a lot of time to understand the classes or methods in the lib.

Is there any explanation of the pfc lib?

Reply #1
There are several reason for the existence of PFC in foobar2000.

One is a wish to decouple the base functionality that components can use from a particular compiler runtime. Without PFC, we would need to mandate a particular VC++ version shared between all components.

Another one is that the code has a lot of heritage, from the days of VC6. That compiler had a positively horrible runtime library with plenty of bugs. Any developer from that era tends to have their own base library.

All in all, it's designed as an auxillary library focused on correctness in sharing data between multiple modules, a rather non-trivial problem.
Stay sane, exile.

Is there any explanation of the pfc lib?

Reply #2
There are several reason for the existence of PFC in foobar2000.

One is a wish to decouple the base functionality that components can use from a particular compiler runtime. Without PFC, we would need to mandate a particular VC++ version shared between all components.

Another one is that the code has a lot of heritage, from the days of VC6. That compiler had a positively horrible runtime library with plenty of bugs. Any developer from that era tends to have their own base library.

All in all, it's designed as an auxillary library focused on correctness in sharing data between multiple modules, a rather non-trivial problem.

Thanks a lot! By the way, is there any docs about it?

 

Is there any explanation of the pfc lib?

Reply #3
Most of the documentation for the foobar2000 SDK, including PFC, is in comments in the code. There's some high level tips in sdk-readme.html, but in general, it's comments and looking at existing code.
Stay sane, exile.

Re: Is there any explanation of the pfc lib?

Reply #4
I had two other questions about PFC:
  • Does P.F.C. stands for anything?
  • From what I read above it is for having a stable interface between modules. In my own DSP plugin, should I bother using for example pfc::array_t or should I better use std module (for example std::vector here), for the objects I am not exposing?

Thanks!

PS: I'm refreshing old topics but let me know if I should rather create new ones. I thought it'd be better to have things grouped together for future readers.

Re: Is there any explanation of the pfc lib?

Reply #5
@mero, personally, I use pfc containers only when it's required by fb2k Api. pfc containers are quite old and are missing quite a few optimizations of their std counterparts. I've also created a std interface wrapper for pfc containers, so that generic std features could be utilized (e. g. algorithms).