manual: Rewrite section on score table.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 27 Mar 2016 04:28:31 +0000 (04:28 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 15 May 2016 10:19:18 +0000 (12:19 +0200)
This streamlines the text a bit and adds a starting sentence which
describes the purpose of the score table.

web/manual.md

index 43509f129237246265f3644cdf93bc776bd9a1cc..b154b3919091ff6a897a45f0f333fba1be4875bc 100644 (file)
@@ -779,21 +779,19 @@ or playlist is activated with the select command.
 
 ### The score table ###
 
-Unlike all other tables the contents of the score table remain in
-memory and are never stored on disk. The score table contains two
-columns: The SHA1 hash value (of an audio file) and its current
-score.
-
-However, only those files which are admissible for the current mood
-or playlist are contained in the score table. The audio file selector
-always chooses the row with the highest score as the file to stream
-next. While doing so, it computes the new score and updates the
-last_played and the num_played fields in the audio file table.
-
-The score table is recomputed by the select command which loads a
-mood or playlist. Audio files are chosen for streaming from the rows
-of the score table on a highest-score-first basis.
-
+The score table describes those audio files which are admissible for
+the current mood or playlist (see below). The table has two columns:
+a pointer to a row of the audio file table and a score value.
+
+Unlike all other tables of the database, the score table remains in
+memory and is never stored on disk. It is initialized at startup and
+recomputed when the select command loads a new mood or playlist.
+
+When the audio file selector is asked to open the next audio file,
+it picks the row with the highest score, opens the corresponding
+file and passes the file descriptor to the virtual streaming system.
+At this point the last_played and the num_played fields of the selected
+file are updated and the score is recomputed.
 
 Playlists and moods
 -------------------