Mercurial > audlegacy
diff src/audacious/playback.c @ 3705:38259e9394a2
add InputPlayback::set_params() and InputPlayback::set_title() which will
replace InputPlugin::set_info() and InputPlugin::set_info_text() someday.
| author | William Pitcock <nenolod@atheme.org> |
|---|---|
| date | Sun, 07 Oct 2007 14:05:16 -0500 |
| parents | 418ac922ce87 |
| children | a89a12aa4f2c |
line wrap: on
line diff
--- a/src/audacious/playback.c Sun Oct 07 13:40:45 2007 -0500 +++ b/src/audacious/playback.c Sun Oct 07 14:05:16 2007 -0500 @@ -102,6 +102,28 @@ g_mutex_unlock(playback->pb_change_mutex); } +static void +playback_set_pb_params(InputPlayback *playback, gchar *title, + gint length, gint rate, gint freq, gint nch) +{ + playback->title = g_strdup(title); + playback->length = length; + playback->rate = rate; + playback->freq = freq; + playback->nch = nch; + + /* XXX: this can be removed/merged here someday */ + playback->plugin->set_info(title, length, rate, freq, nch); +} + +static void +playback_set_pb_title(InputPlayback *playback, gchar *title) +{ + playback->title = g_strdup(title); + + playback->plugin->set_info_text(title); +} + void playback_eof(void) { @@ -388,6 +410,8 @@ /* init vtable functors */ playback->set_pb_ready = playback_set_pb_ready; playback->set_pb_change = playback_set_pb_change; + playback->set_params = playback_set_pb_params; + playback->set_title = playback_set_pb_title; set_current_input_playback(playback);
