mood: Deduplicate score formula.
authorAndre Noll <maan@systemlinux.org>
Wed, 4 Sep 2013 20:14:12 +0000 (20:14 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 13 Oct 2013 13:25:06 +0000 (15:25 +0200)
commit6bcd10bc4ada11a04bc2b7425afe5a8855592cd2
treeab20cfdeb71b25d63cec798fbc74ad8c51bb13f0
parentf24778705c853647f48b89c8d27ba1ded27a6f29
mood: Deduplicate score formula.

mood.c computes the score of an audio file from its subscores (mood,
last_played, num_played) at two locations, both of which use the same
formula (a + b + c) / 3.

Get rid of this duplication by doing the calculation only once in
compute_dynamic_score(). Rename this function to compute_score() as
it now includes the (static) mood score as well.
mood.c