Skip to main content
Topic: Why won't foo_ui_classic compile? (Read 2985 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Why won't foo_ui_classic compile?

After doing some searching around, I found a fairly easy way to implement support for the media keys on my Microsoft Multimedia Natural keyboard...  The only problem is that foo_ui_classic won't compile.  I have the dependencies set up for SDK and PFC, but it keeps giving me a "cannot instantiate abstract class" error.  Is this happening for a specific reason, or am I just dumb (or both)?

Why won't foo_ui_classic compile?

Reply #1
it needs updating for 0.6+ sdk.

more specifically you need to change the
Code: [Select]
virtual void on_playback_new_track(const playlist_entry * track)
line to
Code: [Select]
virtual void on_playback_new_track(metadb_handle * tracks)


(though im no expert coder) i dont even think the now_playing stuff (in on_playback_new_track()) is needed, so rather than updating it, you can just delete it probably, though its not much effort to change.

anyhow does foobar's built in support for multimedia keyboards not suit your needs ? and I dont think you'd need play_callback anyway for what ever it is you're doing ?
.

Why won't foo_ui_classic compile?

Reply #2
Quote
it needs updating for 0.6+ sdk.

more specifically you need to change the
Code: [Select]
virtual void on_playback_new_track(const playlist_entry * track)
line to
Code: [Select]
virtual void on_playback_new_track(metadb_handle * tracks)


(though im no expert coder) i dont even think the now_playing stuff (in on_playback_new_track()) is needed, so rather than updating it, you can just delete it probably, though its not much effort to change.

anyhow does foobar's built in support for multimedia keyboards not suit your needs ? and I dont think you'd need play_callback anyway for what ever it is you're doing ?

Do the keys not have scan codes?  Try some app that will tell you the keycode for the multimedia keys and then just set the hotkeys up manually...

Why won't foo_ui_classic compile?

Reply #3
OK, musicmusic, when I do that, I no longer get my instantiating error, but using metadb_handle fucks up the now_playing.copy command.  I tracked it down to playlist_entry.h, but attempting to change that to metadb_handle to avoid THAT error just messes other things up.  However, deleting the now_playing line nullifies the additions I made to the code, and no longer correctly passes the keys through correctly.

And zanson, the keys work as a sort of pass-through, and work with almost all of the media applications I use, just not Foobar.

Why won't foo_ui_classic compile?

Reply #4
Well you can just do now_playing.copy(track->handle_get_location()); i think, but you could probably do whatever your doing in a better way.. (I dont know.)
.

Why won't foo_ui_classic compile?

Reply #5
Quote
And zanson, the keys work as a sort of pass-through, and work with almost all of the media applications I use, just not Foobar.

If you can set them up as foobar global hotkeys then they will work no matter what application is active, as long as foobar is running.  If that is possible I really think it would be easier than you creating a plugin to catch them.

 
SimplePortal 1.0.0 RC1 © 2008-2019