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: Specific question about Foobar2000 SDK function hooking design (Read 1385 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Specific question about Foobar2000 SDK function hooking design

I've got an idea of creating improved Open-Source version of m-TAGS foobar component. However I admit I haven't got any knowledge of Foobar SDK. And if what I ask is possible in Foobar SDK, I'll start this project, if not, I won't even bother to learn the SDK.

Because I haven't yet looked into the workflow/communication of Foobar2000 plugin system, my questions might not make sense to you, so don't absolutely judge me on that.

Ok, so here's the questions.

1.    Is it possible to hook the Read/Write Song Metadata foobar functions to globally redirect them not to files, but to component-managed metadata database?

2.    How could it be possible to hook those functions only in one playlist's scope? For example, my plugin (let's call it Nu-Tags) scans a specific playlist (by already provided SDK interfaces), generating the initial metadata database. Then how could all subsequent tag-writing functions from core/other components on that playlist would be redirected to Nu-Tags component?

3.    How would it be possible to save/load the state of which playlists should be managed by the Nu-Tags component?

Re: Specific question about Foobar2000 SDK function hooking design

Reply #1
It is not possible to hook metadata reading/writing.

You can however overlay your own info in title formatting fields using metadb_display_field_provider, but its functionality is severely limited to providing a fixed set of fields per component. We used to have a much more powerful API for the same (metadb_display_hook allowing unrestricted injection of arbitrary fields/functions), but it had to be removed due total chaos caused by components using it in most strange ways.
Microsoft Windows: We can't script here, this is bat country.