]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - afh_common.c
afh: Move audio_format_name() up.
[paraslash.git] / afh_common.c
index bab4d41577952f257ef8c828f9c89c8886a7d2e5..dcb0b856677de1bded1daa0cee8e3e2002870bf5 100644 (file)
@@ -85,6 +85,21 @@ static struct audio_format_handler afl[] = {
        }
 };
 
        }
 };
 
+/**
+ * Get the name of the given audio format.
+ *
+ * \param i The audio format number.
+ *
+ * \return This returns a pointer to statically allocated memory so it
+ * must not be freed by the caller.
+ */
+const char *audio_format_name(int i)
+{
+       if (i < 0 || i >= ARRAY_SIZE(afl) - 1)
+               return "???";
+       return afl[i].name;
+}
+
 static inline int next_audio_format(int format)
 {
        for (;;) {
 static inline int next_audio_format(int format)
 {
        for (;;) {
@@ -160,21 +175,6 @@ int guess_audio_format(const char *name)
        return -E_AUDIO_FORMAT;
 }
 
        return -E_AUDIO_FORMAT;
 }
 
-/**
- * Get the name of the given audio format.
- *
- * \param i The audio format number.
- *
- * \return This returns a pointer to statically allocated memory so it
- * must not be freed by the caller.
- */
-const char *audio_format_name(int i)
-{
-       if (i < 0 || i >= ARRAY_SIZE(afl) - 1)
-               return "???";
-       return afl[i].name;
-}
-
 static int get_file_info(int format, const char *path, char *data,
                size_t size, int fd, struct afh_info *afhi)
 {
 static int get_file_info(int format, const char *path, char *data,
                size_t size, int fd, struct afh_info *afhi)
 {