X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mood.c;h=d82d5a52c3b704cffd3657c9b6bad25121c5b4f2;hp=c03867c1b86a27551f24c5b97a608f9e1107d2e8;hb=c41a04fb296e068ebfec78bba9678bf15daea896;hpb=6668ac4a8c7f2a92efb9e6d405d954beff77d230 diff --git a/mood.c b/mood.c index c03867c1..d82d5a52 100644 --- a/mood.c +++ b/mood.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2010 Andre Noll + * Copyright (C) 2007-2011 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -79,13 +79,13 @@ struct mood { static struct mood *current_mood; /** - * Rough approximation to sqrt. + * Rough approximation to sqrt. * - * \param x Integer of which to calculate the sqrt. + * \param x Integer of which to calculate the sqrt. * - * \return An integer res with res * res <= x. + * \return An integer res with res * res <= x. */ -static uint64_t int_sqrt(uint64_t x) +__a_const static uint64_t int_sqrt(uint64_t x) { uint64_t op, res, one = 1; op = x; @@ -873,7 +873,7 @@ out: * * \sa mood_open(), mood_close(). */ -int reload_current_mood(void) +static int reload_current_mood(void) { int ret; char *mood_name = NULL; @@ -890,6 +890,17 @@ int reload_current_mood(void) return ret; } +/** + * Notification callback for the moods table. + * + * \param event Type of the event just occurred. + * \param pb Unused. + * \param data Its type depends on the event. + * + * This function performs actions required due to the occurrence of the given + * event. Possible actions include reload of the current mood and update of the + * score of an audio file. + */ int moods_event_handler(enum afs_events event, __a_unused struct para_buffer *pb, void *data) { @@ -926,4 +937,3 @@ int moods_event_handler(enum afs_events event, __a_unused struct para_buffer *pb return 1; } } -