Mercurial > hg > xmms-sid
diff src/xmms-sid.c @ 202:fe684a2ccdc7
Reworking code.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 16 Nov 2004 06:56:02 +0000 |
parents | ec8b735f5418 |
children | 8ebef120d67f |
line wrap: on
line diff
--- a/src/xmms-sid.c Tue Nov 16 06:55:04 2004 +0000 +++ b/src/xmms-sid.c Tue Nov 16 06:56:02 2004 +0000 @@ -411,6 +411,9 @@ /* * Start playing the given file + * Here we load the tune and initialize the playing thread. + * Usually you would also initialize the output-plugin, but + * this is XMMS-SID and we do it on the player thread instead. */ void xs_play_file(gchar *pcFilename) { @@ -450,6 +453,12 @@ /* * Stop playing + * Here we set the playing status to stop and wait for playing + * thread to shut down. In any "correctly" done plugin, this is + * also the function where you close the output-plugin, but since + * XMMS-SID's special behaviour, we don't do that here. + * + * Finally tune and other memory allocations are free'd. */ void xs_stop(void) { @@ -668,7 +677,12 @@ /* * Set the time-seek position - * (the playing thread will do the "seeking" aka song-change) + * The playing thread will do the "seeking", which means sub-tune + * changing in XMMS-SID's case. iTime argument is time in seconds, + * in contrast to milliseconds used in other occasions. + * + * This function is called whenever position slider is clicked or + * other method of seeking is used (keyboard, etc.) */ void xs_seek(gint iTime) { @@ -709,6 +723,10 @@ /* * Return the playing "position/time" + * Determine current position/time in song. Used by XMMS to update + * the song clock and position slider and MOST importantly to determine + * END OF SONG! Return value of -2 means error, XMMS opens an audio + * error dialog. -1 means end of song (if one was playing currently). */ gint xs_get_time(void) { @@ -746,6 +764,9 @@ /* * Return song information + * This function is called by XMMS when initially loading the playlist. + * Subsequent changes to information are made by the player thread, + * which uses xs_plugin_ip.set_info(); */ void xs_get_song_info(gchar *songFilename, gchar **songTitle, gint *songLength) {