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: Getting started, few questions (Read 2603 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Getting started, few questions

Hi all!
I'm going to port my winamp plugin to foobar and having hard times trying to accomplish some tasks.

There are my tasks:
- Show context menu on playlist entry and empty space. Ability to conditionally hide/disable menu items on click will be great, but is not nessesary.
- Add url and file to playlist.
- Basic playback control: play/stop/pause current track, set current track, set playback position.
- Ability to get current track, current playback position and length, current playback state.
- Enumerate selected playlist entries on context menu items clicks.

Some hints or examples will be appretiated.
Sorry for possible linguistic mistakes, English is not my native language.


Getting started, few questions

Reply #2
Yes, I had. Examples helped me to create simple hello-world plugin and gave me advice to check sdk source code due to lack of docs. Sources are not so self-describing for me, though.

Getting started, few questions

Reply #3
Alright.
  • The playback state can be queried and controlled through the playback_control service.
  • If your context menu item is implemented using contextmenu_item_simple, you can control the menu item state by assigning the desired value to the p_displayflags parameter in the context_get_display method. In the context_get_display and context_command methods, the p_data parameter contains the selected tracks and the p_caller parameter can be used to check whether the command is invoked on the playlist or somewhere else - if such a distinction is needed.
  • The playlist_incoming_item_filter service is the high level interface to turn URLs and files into metadb_handle which can be added to a playlist using the playlist_manager service.

Getting started, few questions

Reply #4
Thanks a lot! I will try all that cool stuff soon.
foobar SDK seems to be pretty much powerful and flexible, but lack of documentation somewhat spoils a fun