From: Eelco S. <ee...@sc...> - 2005-02-27 17:01:15
|
Hi, I just started playing around with libvisual in an attempt to get the hang of it. So far there's been one thing I haven't gotten to work; detectig a new song. To spot a new song I figured that the events function would be the best place for this. Check the event queue and see if there's a VISUAL_EVENT_NEWSONG type in the queue. However, nothing happens (tested it with amarok and xmms), there is no event indicating a new song started playing. What could be the problem? Is this a libvisual problem or isn't it implemented in the player(s)? I've pasted the events function below for reference. Kind regards, Eelco Schijf Btw, as you can see there's also the VISUAL_EVENT_RESIZE event, which works fine. int liquidmp3_events (VisPluginData *plugin, VisEventQueue *events) { VisEvent ev; VisSongInfo *songinfo; // retrieve songinfo songinfo = visual_plugin_actor_get_songinfo( VISUAL_PLUGIN_ACTOR (visual_plugin_get_specific(plugin)) ); while (visual_event_queue_poll (events, &ev)) { switch (ev.type) { case VISUAL_EVENT_RESIZE: liquidmp3_dimension (plugin, ev.resize.video, ev.resize.width, ev.resize.height); break; case VISUAL_EVENT_NEWSONG: printf( New song detected (%s)", songinfo->song ); break; default: // to avoid warnings break; } } return 0; } |