From 68ec1b4e13c62fd94b713bc4983ff86ed9f7f4ef Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 17 Nov 2007 20:35:23 +0100 Subject: [PATCH] open_and_update_audio_file(): Interchange two arguments. And add documentation of the "score" parameter. --- afs.c | 2 +- afs.h | 4 ++-- aft.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/afs.c b/afs.c index 35540087..353626ee 100644 --- a/afs.c +++ b/afs.c @@ -492,7 +492,7 @@ int open_next_audio_file(void) ret = score_get_best(&aft_row, &score); if (ret < 0) return ret; - ret = open_and_update_audio_file(aft_row, &afd, score); + ret = open_and_update_audio_file(aft_row, score, &afd); if (ret < 0) return ret; shmid = ret; diff --git a/afs.h b/afs.h index f15b8c55..7aea5cb2 100644 --- a/afs.h +++ b/afs.h @@ -199,8 +199,8 @@ int get_attribute_text(uint64_t *atts, const char *delim, char **text); /* aft */ void aft_init(struct afs_table *t); int aft_get_row_of_path(const char *path, struct osl_row **row); -int open_and_update_audio_file(struct osl_row *aft_row, - struct audio_file_data *afd, long score); +int open_and_update_audio_file(struct osl_row *aft_row, long score, + struct audio_file_data *afd); int load_afd(int shmid, struct audio_file_data *afd); int load_afsi(struct afs_info *afsi, struct osl_object *obj); void save_afsi(struct afs_info *afsi, struct osl_object *obj); diff --git a/aft.c b/aft.c index df6c2592..ce1f4284 100644 --- a/aft.c +++ b/aft.c @@ -622,6 +622,7 @@ int load_afd(int shmid, struct audio_file_data *afd) * Mmap the given audio file and update statistics. * * \param aft_row Determines the audio file to be opened and updated. + * \param score The score of the audio file. * \param afd Result pointer. * * On success, the numplayed field of the audio file selector info is increased @@ -630,8 +631,8 @@ int load_afd(int shmid, struct audio_file_data *afd) * * \return Positive shmid on success, negative on errors. */ -int open_and_update_audio_file(struct osl_row *aft_row, - struct audio_file_data *afd, long score) +int open_and_update_audio_file(struct osl_row *aft_row, long score, + struct audio_file_data *afd) { HASH_TYPE *aft_hash, file_hash[HASH_SIZE]; struct osl_object afsi_obj; -- 2.39.5